mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-14 03:56:55 +03:00
docs(www): update example models (#58290)
This commit is contained in:
@@ -8,7 +8,7 @@ Create a Markdown file to add a reusable agent. This example adds a read-only re
|
||||
---
|
||||
description: Reviews changes for correctness and regressions
|
||||
mode: subagent
|
||||
model: anthropic/claude-sonnet-4-5#high
|
||||
model: anthropic/claude-sonnet-5-5#high
|
||||
permissions:
|
||||
- action: edit
|
||||
resource: "*"
|
||||
@@ -201,7 +201,7 @@ mode: all
|
||||
`model` uses `provider/model` with an optional `#variant`:
|
||||
|
||||
```yaml
|
||||
model: anthropic/claude-sonnet-4-5#high
|
||||
model: anthropic/claude-sonnet-5-5#high
|
||||
```
|
||||
|
||||
JSON configuration also accepts the expanded form:
|
||||
@@ -212,7 +212,7 @@ JSON configuration also accepts the expanded form:
|
||||
"reviewer": {
|
||||
"model": {
|
||||
"providerID": "anthropic",
|
||||
"model": "claude-sonnet-4-5",
|
||||
"model": "claude-sonnet-5-5",
|
||||
"variant": "high",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -325,7 +325,7 @@ effect: (ctx) =>
|
||||
editor.update("anthropic", (provider) => {
|
||||
provider.headers = { ...provider.headers, "x-company": "engineering" }
|
||||
})
|
||||
editor.models.update("anthropic", "claude-sonnet-4-5", (model) => (model.name = "Team Sonnet"))
|
||||
editor.models.update("anthropic", "claude-sonnet-5-5", (model) => (model.name = "Team Sonnet"))
|
||||
editor.models.remove("anthropic", "legacy-model")
|
||||
editor.remove("legacy-provider")
|
||||
})
|
||||
@@ -412,7 +412,7 @@ effect: (ctx) =>
|
||||
draft.enabled = draft.capabilities.tools
|
||||
})
|
||||
})
|
||||
editor.default.set("anthropic", "claude-sonnet-4-5")
|
||||
editor.default.set("anthropic", "claude-sonnet-5-5")
|
||||
editor.remove("anthropic", "legacy-model")
|
||||
})
|
||||
}),
|
||||
@@ -427,7 +427,7 @@ effect: (ctx) =>
|
||||
Effect.gen(function* () {
|
||||
const model = ctx.model
|
||||
yield* model.transform((editor) => {
|
||||
const source = editor.provider.get("anthropic")?.models.get("claude-sonnet-4-5")
|
||||
const source = editor.provider.get("anthropic")?.models.get("claude-sonnet-5-5")
|
||||
if (!source) return
|
||||
editor.update("anthropic", source.id, (draft) => {
|
||||
draft.limit.context = Math.min(draft.limit.context, source.limit.context)
|
||||
@@ -800,7 +800,7 @@ effect: (ctx) =>
|
||||
yield* session
|
||||
.switchModel({
|
||||
sessionID: current.id,
|
||||
model: { providerID: Provider.ID.make("anthropic"), id: Model.ID.make("claude-sonnet-4-5") },
|
||||
model: { providerID: Provider.ID.make("anthropic"), id: Model.ID.make("claude-sonnet-5-5") },
|
||||
})
|
||||
.pipe(Effect.orDie)
|
||||
}),
|
||||
|
||||
@@ -283,7 +283,7 @@ await ctx.provider.transform((editor) => {
|
||||
editor.update("anthropic", (provider) => {
|
||||
provider.headers = { ...provider.headers, "x-company": "engineering" }
|
||||
})
|
||||
editor.models.update("anthropic", "claude-sonnet-4-5", (model) => {
|
||||
editor.models.update("anthropic", "claude-sonnet-5-5", (model) => {
|
||||
model.name = "Team Sonnet"
|
||||
})
|
||||
editor.models.remove("anthropic", "legacy-model")
|
||||
@@ -364,7 +364,7 @@ await ctx.model.transform((editor) => {
|
||||
draft.enabled = draft.capabilities.tools
|
||||
})
|
||||
})
|
||||
editor.default.set("anthropic", "claude-sonnet-4-5")
|
||||
editor.default.set("anthropic", "claude-sonnet-5-5")
|
||||
editor.remove("anthropic", "legacy-model")
|
||||
})
|
||||
```
|
||||
@@ -375,7 +375,7 @@ model-transform output.
|
||||
|
||||
```ts
|
||||
await ctx.model.transform((editor) => {
|
||||
const source = editor.provider.get("anthropic")?.models.get("claude-sonnet-4-5")
|
||||
const source = editor.provider.get("anthropic")?.models.get("claude-sonnet-5-5")
|
||||
if (!source) return
|
||||
editor.update("anthropic", source.id, (model) => {
|
||||
model.limit.context = Math.min(model.limit.context, source.limit.context)
|
||||
@@ -731,7 +731,7 @@ Generate text with a selected model without creating a session, invoking tools,
|
||||
|
||||
```ts
|
||||
const review = await ctx.generate.text({
|
||||
model: { providerID: "anthropic", id: "claude-sonnet-4-6" },
|
||||
model: { providerID: "anthropic", id: "claude-sonnet-5-5" },
|
||||
prompt: "Review this proposed action.",
|
||||
})
|
||||
```
|
||||
@@ -804,7 +804,7 @@ Change the agent or model used by subsequent requests.
|
||||
|
||||
```ts
|
||||
await ctx.session.switchAgent({ sessionID, agent: "build" })
|
||||
await ctx.session.switchModel({ sessionID, model: { providerID: "anthropic", id: "claude-sonnet-4-5" } })
|
||||
await ctx.session.switchModel({ sessionID, model: { providerID: "anthropic", id: "claude-sonnet-5-5" } })
|
||||
```
|
||||
|
||||
Send user prompts, transient generation requests, commands, or synthetic messages.
|
||||
@@ -1671,7 +1671,7 @@ await ctx.permission.hook("evaluate", async (event) => {
|
||||
|
||||
const messages = await ctx.session.context({ sessionID: event.sessionID })
|
||||
const review = await ctx.generate.text({
|
||||
model: { providerID: "anthropic", id: "claude-sonnet-4-6" },
|
||||
model: { providerID: "anthropic", id: "claude-sonnet-5-5" },
|
||||
prompt: buildSafetyPrompt({ messages, action: event.action, resources: event.resources }),
|
||||
})
|
||||
const decision = parseDecision(review.text)
|
||||
|
||||
@@ -169,7 +169,7 @@ New sessions use the directory's default model and primary agent. The responses
|
||||
`session/set_config_option` takes string values:
|
||||
|
||||
```json
|
||||
{ "sessionId": "ses_123", "configId": "model", "value": "anthropic/claude-sonnet-4" }
|
||||
{ "sessionId": "ses_123", "configId": "model", "value": "anthropic/claude-sonnet-5-5" }
|
||||
```
|
||||
|
||||
`session/set_mode` also sets the agent. OpenCode sends `config_option_update` when the available models or agents
|
||||
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: npm install --global @opencode/cli
|
||||
- run: opencode run --standalone --model anthropic/claude-sonnet-4-5 "Review this repository for correctness and summarize any issues."
|
||||
- run: opencode run --standalone --model anthropic/claude-sonnet-5-5 "Review this repository for correctness and summarize any issues."
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
```
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
Choose a model.
|
||||
|
||||
```bash
|
||||
$ opencode run --model anthropic/claude-sonnet-4-5 "Refactor parseToken"
|
||||
$ opencode run --model anthropic/claude-sonnet-5-5 "Refactor parseToken"
|
||||
```
|
||||
|
||||
Continue the last session.
|
||||
@@ -97,7 +97,7 @@ $ opencode mini --continue
|
||||
Start with a model and an initial prompt.
|
||||
|
||||
```bash
|
||||
$ opencode mini --model anthropic/claude-sonnet-4-5 --prompt "Summarize this repository"
|
||||
$ opencode mini --model anthropic/claude-sonnet-5-5 --prompt "Summarize this repository"
|
||||
```
|
||||
|
||||
Continue a specific session.
|
||||
|
||||
@@ -40,7 +40,7 @@ Add YAML frontmatter when the command needs metadata. The trimmed Markdown body
|
||||
---
|
||||
description: Review code for correctness
|
||||
agent: plan
|
||||
model: anthropic/claude-sonnet-4-5#high
|
||||
model: anthropic/claude-sonnet-5-5#high
|
||||
---
|
||||
|
||||
Review $ARGUMENTS. Report bugs first.
|
||||
@@ -85,7 +85,7 @@ For example, this JSON command sets every current optional field:
|
||||
"template": "Audit $ARGUMENTS.",
|
||||
"description": "Audit a package",
|
||||
"agent": "general",
|
||||
"model": "anthropic/claude-sonnet-4-5#high",
|
||||
"model": "anthropic/claude-sonnet-5-5#high",
|
||||
"subagent": true,
|
||||
},
|
||||
},
|
||||
@@ -201,7 +201,7 @@ For example, this command selects both its agent and an explicit model:
|
||||
```md title=".opencode/commands/design.md"
|
||||
---
|
||||
agent: plan
|
||||
model: openai/gpt-5#high
|
||||
model: openai/gpt-6.1-sol#high
|
||||
---
|
||||
|
||||
Design $ARGUMENTS.
|
||||
|
||||
@@ -116,7 +116,7 @@ provider or model with `settings.compaction`:
|
||||
"openai": {
|
||||
"settings": { "compaction": { "type": "native" } },
|
||||
"models": {
|
||||
"gpt-4.1": { "settings": { "compaction": { "type": "summary" } } },
|
||||
"gpt-6.1-sol": { "settings": { "compaction": { "type": "summary" } } },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -7,7 +7,7 @@ Create `opencode.jsonc` in your project to configure OpenCode. Add the schema fo
|
||||
```jsonc title="opencode.jsonc"
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
}
|
||||
```
|
||||
|
||||
@@ -21,7 +21,7 @@ OpenCode supports JSON and JSONC. Use JSONC when you want comments or trailing c
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
// Use this model by default.
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
}
|
||||
```
|
||||
|
||||
@@ -142,7 +142,7 @@ does not retain a `#variant`; agent and command model references can select one.
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
}
|
||||
```
|
||||
|
||||
@@ -377,7 +377,7 @@ automatic and manual requests with a provider or model policy:
|
||||
"openai": {
|
||||
"settings": { "compaction": { "type": "native" } },
|
||||
"models": {
|
||||
"gpt-4.1": { "settings": { "compaction": { "type": "summary" } } },
|
||||
"gpt-6.1-sol": { "settings": { "compaction": { "type": "summary" } } },
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -539,9 +539,9 @@ headers, and model variants.
|
||||
"providers": {
|
||||
"openai": {
|
||||
"models": {
|
||||
"gpt-5.2-custom": {
|
||||
"modelID": "gpt-5.2",
|
||||
"name": "GPT-5.2 Custom",
|
||||
"gpt-6.1-sol-custom": {
|
||||
"modelID": "gpt-6.1-sol",
|
||||
"name": "GPT-6.1 Sol Custom",
|
||||
"limit": {
|
||||
"context": 200000,
|
||||
"output": 32000,
|
||||
|
||||
@@ -11,7 +11,7 @@ curl -X POST "https://opencode.ai/inference/openai/v1/chat/completions" \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "kimi-k2.6",
|
||||
"model": "kimi-k3",
|
||||
"messages": [{ "role": "user", "content": "Say hi" }]
|
||||
}'
|
||||
```
|
||||
@@ -44,14 +44,14 @@ curl https://opencode.ai/inference/v1/models
|
||||
|
||||
### OpenAI Chat Completions
|
||||
|
||||
Open models such as `kimi-k2.6`, `glm-5.1`, `minimax-m2.7`, and the free models use the Chat Completions API.
|
||||
Open models such as `kimi-k3`, `glm-5.3`, `minimax-m3`, and the free models use the Chat Completions API.
|
||||
|
||||
```bash
|
||||
curl -X POST "https://opencode.ai/inference/openai/v1/chat/completions" \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "glm-5.1",
|
||||
"model": "glm-5.3",
|
||||
"messages": [{ "role": "user", "content": "Say hi" }]
|
||||
}'
|
||||
```
|
||||
@@ -65,7 +65,7 @@ curl -X POST "https://opencode.ai/inference/openai/v1/responses" \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "gpt-5.5",
|
||||
"model": "gpt-6.1-sol",
|
||||
"input": "Say hi"
|
||||
}'
|
||||
```
|
||||
@@ -79,7 +79,7 @@ curl -X POST "https://opencode.ai/inference/anthropic/v1/messages" \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "claude-sonnet-4-6",
|
||||
"model": "claude-sonnet-5-5",
|
||||
"max_tokens": 1024,
|
||||
"messages": [{ "role": "user", "content": "Say hi" }]
|
||||
}'
|
||||
@@ -91,7 +91,7 @@ Gemini models take the model and method in the path. Replace `:generateContent`
|
||||
stream the response.
|
||||
|
||||
```bash
|
||||
curl -X POST "https://opencode.ai/inference/google/v1beta/models/gemini-3.1-pro:generateContent" \
|
||||
curl -X POST "https://opencode.ai/inference/google/v1beta/models/gemini-4-argon:generateContent" \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
|
||||
@@ -12,7 +12,7 @@ curl -X POST "https://opencode.ai/inference/custom/conn_.../chat/completions" \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek-v4.1-flash",
|
||||
"messages": [{ "role": "user", "content": "Say hi" }]
|
||||
}'
|
||||
```
|
||||
@@ -59,7 +59,7 @@ curl -X POST "https://opencode.ai/inference/custom/conn_.../chat/completions" \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek-v4.1-flash",
|
||||
"messages": [{ "role": "user", "content": "Say hi" }]
|
||||
}'
|
||||
```
|
||||
@@ -71,7 +71,7 @@ curl -X POST "https://opencode.ai/inference/custom/conn_.../responses" \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "gpt-5.4",
|
||||
"model": "gpt-6.1-sol",
|
||||
"input": "Say hi"
|
||||
}'
|
||||
```
|
||||
@@ -85,7 +85,7 @@ curl -X POST "https://opencode.ai/inference/custom/conn_.../messages" \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "claude-sonnet-4-6",
|
||||
"model": "claude-sonnet-5-5",
|
||||
"max_tokens": 1024,
|
||||
"messages": [{ "role": "user", "content": "Say hi" }]
|
||||
}'
|
||||
@@ -97,7 +97,7 @@ The model and method are part of the path. Replace `:generateContent` with `:str
|
||||
response.
|
||||
|
||||
```bash
|
||||
curl -X POST "https://opencode.ai/inference/custom/conn_.../models/gemini-3.1-pro:generateContent" \
|
||||
curl -X POST "https://opencode.ai/inference/custom/conn_.../models/gemini-4-argon:generateContent" \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
|
||||
@@ -11,7 +11,7 @@ Spark.
|
||||
Add Console as a model provider in `~/.codex/config.toml` and make it the default.
|
||||
|
||||
```toml title="~/.codex/config.toml"
|
||||
model = "gpt-5.5"
|
||||
model = "gpt-6.1-sol"
|
||||
model_provider = "opencode"
|
||||
|
||||
[model_providers.opencode]
|
||||
|
||||
@@ -128,7 +128,7 @@ use the format `opencode/<model-id>`:
|
||||
```jsonc title="opencode.jsonc"
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"model": "opencode/gpt-5.5",
|
||||
"model": "opencode/gpt-6.1-sol",
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ V2 config:
|
||||
"agent": {
|
||||
"reviewer": {
|
||||
"prompt": "Review for correctness and missing tests.",
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"variant": "high",
|
||||
"disable": false,
|
||||
"permission": {
|
||||
@@ -165,7 +165,7 @@ V2 config:
|
||||
"agents": {
|
||||
"reviewer": {
|
||||
"system": "Review for correctness and missing tests.",
|
||||
"model": "anthropic/claude-sonnet-4-5#high",
|
||||
"model": "anthropic/claude-sonnet-5-5#high",
|
||||
"disabled": false,
|
||||
"permissions": [
|
||||
{ "action": "edit", "resource": "*", "effect": "deny" }
|
||||
@@ -322,7 +322,7 @@ Rename the singular `command` map to `commands` and `subtask` to `subagent`. Joi
|
||||
"command": {
|
||||
"review": {
|
||||
"template": "Review the current changes.",
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
"variant": "high",
|
||||
"subtask": true
|
||||
}
|
||||
@@ -334,7 +334,7 @@ Rename the singular `command` map to `commands` and `subtask` to `subagent`. Joi
|
||||
"commands": {
|
||||
"review": {
|
||||
"template": "Review the current changes.",
|
||||
"model": "anthropic/claude-sonnet-4-5#high",
|
||||
"model": "anthropic/claude-sonnet-5-5#high",
|
||||
"subagent": true
|
||||
}
|
||||
}
|
||||
@@ -521,12 +521,12 @@ the native name for background delegation. If frontmatter has separate
|
||||
|
||||
```yaml
|
||||
# V1
|
||||
model: anthropic/claude-sonnet-4-5
|
||||
model: anthropic/claude-sonnet-5-5
|
||||
variant: high
|
||||
subtask: true
|
||||
|
||||
# V2
|
||||
model: anthropic/claude-sonnet-4-5#high
|
||||
model: anthropic/claude-sonnet-5-5#high
|
||||
subagent: true
|
||||
```
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Pick an entry from `/models` instead of guessing its provider or model ID. The s
|
||||
and does not change your configuration.
|
||||
|
||||
```text
|
||||
anthropic/claude-sonnet-4-5
|
||||
anthropic/claude-sonnet-5-5
|
||||
```
|
||||
|
||||
Availability is project-specific:
|
||||
@@ -32,7 +32,7 @@ Availability is project-specific:
|
||||
Use `--model` to choose a model for one command-line run without changing the configured default:
|
||||
|
||||
```bash
|
||||
opencode run --model anthropic/claude-sonnet-4-5 "Refactor parseToken"
|
||||
opencode run --model anthropic/claude-sonnet-5-5 "Refactor parseToken"
|
||||
```
|
||||
|
||||
Agents and commands can also choose their own model. See [Agents](/agents) and [Commands](/commands).
|
||||
@@ -44,7 +44,7 @@ Set `model` in `opencode.json` or `opencode.jsonc` to choose the default for new
|
||||
```jsonc title="opencode.jsonc"
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"model": "anthropic/claude-sonnet-4-5",
|
||||
"model": "anthropic/claude-sonnet-5-5",
|
||||
}
|
||||
```
|
||||
|
||||
@@ -81,7 +81,7 @@ Variants are named options for one model, often used for reasoning effort or tok
|
||||
one for a run, session, agent, or command:
|
||||
|
||||
```bash
|
||||
opencode run --model openai/gpt-5.2#high "Review this migration plan"
|
||||
opencode run --model openai/gpt-6.1-sol#high "Review this migration plan"
|
||||
```
|
||||
|
||||
Variant names come from the selected model's current catalog metadata. Names such as `low`, `high`, and `max` are not
|
||||
@@ -95,7 +95,7 @@ Define new variants, or replace catalog variants with the same ID, in the model'
|
||||
"providers": {
|
||||
"openai": {
|
||||
"models": {
|
||||
"gpt-5.2": {
|
||||
"gpt-6.1-sol": {
|
||||
"settings": {
|
||||
"reasoningEffort": "medium",
|
||||
},
|
||||
@@ -131,7 +131,7 @@ To replace a model's reasoning variants, describe its reasoning controls in `cap
|
||||
"providers": {
|
||||
"openai": {
|
||||
"models": {
|
||||
"gpt-5.2": {
|
||||
"gpt-6.1-sol": {
|
||||
"capabilities": {
|
||||
"reasoning": {
|
||||
"supported": true,
|
||||
@@ -169,7 +169,7 @@ Provider and model entries can customize requests with `settings`, `headers`, an
|
||||
"X-Team": "platform",
|
||||
},
|
||||
"models": {
|
||||
"gpt-5.2": {
|
||||
"gpt-6.1-sol": {
|
||||
"settings": {
|
||||
"reasoningEffort": "high",
|
||||
},
|
||||
@@ -208,7 +208,7 @@ Use `modelID` to give an API model a friendlier catalog ID:
|
||||
"openai": {
|
||||
"models": {
|
||||
"coding-default": {
|
||||
"modelID": "gpt-5.2",
|
||||
"modelID": "gpt-6.1-sol",
|
||||
"name": "Coding default",
|
||||
"capabilities": {
|
||||
"tools": true,
|
||||
@@ -226,7 +226,7 @@ Use `modelID` to give an API model a friendlier catalog ID:
|
||||
}
|
||||
```
|
||||
|
||||
Here, `openai/coding-default` is the selectable reference and `gpt-5.2` is sent to the provider. For a model that is not
|
||||
Here, `openai/coding-default` is the selectable reference and `gpt-6.1-sol` is sent to the provider. For a model that is not
|
||||
already in the catalog, OpenCode assumes:
|
||||
|
||||
- Tool support, text and image input, and text output.
|
||||
@@ -288,14 +288,14 @@ Anthropic-style `cache_control` breakpoints. Set `compatibility.cacheFormat` on
|
||||
"package": "@opencode/ai/providers/openai-compatible",
|
||||
"settings": { "baseURL": "https://litellm.example.com/v1" },
|
||||
"models": {
|
||||
"claude-sonnet-5": {
|
||||
"claude-sonnet-5-5": {
|
||||
"compatibility": { "cacheFormat": "anthropic" },
|
||||
},
|
||||
"claude-opus-5-5": {
|
||||
"compatibility": { "cacheFormat": "anthropic" },
|
||||
},
|
||||
// Other models on the same proxy cache automatically and need no setting.
|
||||
"gpt-6.1": {},
|
||||
"gpt-6.1-sol": {},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -464,9 +464,9 @@ substitution such as `"apiKey": "{env:LOCAL_API_KEY}"`; do not commit secrets.
|
||||
Model selectors use `provider/model` with an optional `#variant`:
|
||||
|
||||
```text
|
||||
openai/gpt-5.2
|
||||
openai/gpt-5.2#high
|
||||
openrouter/anthropic/claude-sonnet-4.5#high
|
||||
openai/gpt-6.1-sol
|
||||
openai/gpt-6.1-sol#high
|
||||
openrouter/anthropic/claude-sonnet-5.5#high
|
||||
```
|
||||
|
||||
| Part | Rule |
|
||||
@@ -483,7 +483,7 @@ or an expanded object:
|
||||
{
|
||||
"model": {
|
||||
"providerID": "openrouter",
|
||||
"model": "anthropic/claude-sonnet-4.5",
|
||||
"model": "anthropic/claude-sonnet-5.5",
|
||||
},
|
||||
}
|
||||
```
|
||||
@@ -496,7 +496,7 @@ Keep these rules in mind when configuring models:
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"model": "openai/gpt-5.2"
|
||||
"model": "openai/gpt-6.1-sol"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ Both fields can also be set on a model or variant when only part of a provider's
|
||||
"providers": {
|
||||
"openai": {
|
||||
"models": {
|
||||
"gpt-5.2": {
|
||||
"gpt-6.1-sol": {
|
||||
"headers": { "X-Model-Tier": "coding" },
|
||||
"variants": [
|
||||
{
|
||||
@@ -250,8 +250,8 @@ ID sent to the provider.
|
||||
"openai": {
|
||||
"models": {
|
||||
"coding": {
|
||||
"modelID": "gpt-5.2",
|
||||
"name": "GPT-5.2 Coding",
|
||||
"modelID": "gpt-6.1-sol",
|
||||
"name": "GPT-6.1 Sol Coding",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -340,12 +340,12 @@ switching accounts. To pick up a deployment added later, restart OpenCode or con
|
||||
- Deployments inherit limits, costs, and capabilities from their catalog models.
|
||||
|
||||
Deployment names are their model IDs, in lowercase because Azure ignores case in names, for example
|
||||
`azure/gpt-production`. A deployment named after its model, such as `gpt-5-mini`, keeps the catalog ID. These IDs stay
|
||||
`azure/gpt-production`. A deployment named after its model, such as `gpt-6-luna`, keeps the catalog ID. These IDs stay
|
||||
stable when other deployments are added or removed.
|
||||
|
||||
OpenCode matches a deployment to the catalog by the model it deploys, or by its name when Azure spells the model
|
||||
differently, as with `gpt-4` for GPT-4 Turbo. A deployment named after another model, such as `gpt-5` deploying
|
||||
`gpt-5-mini`, shows that model's name, limits, and costs.
|
||||
differently, as with `gpt-4` for GPT-4 Turbo. A deployment named after another model, such as `gpt-6.1-sol` deploying
|
||||
`gpt-6-luna`, shows that model's name, limits, and costs.
|
||||
|
||||
With the Azure CLI, OpenCode lists deployments through the Azure management API, which needs read access to the
|
||||
resource. If that fails, and always with an API key, it uses the resource's legacy deployment inventory. Discovery reads
|
||||
@@ -361,7 +361,7 @@ kept.
|
||||
"providers": {
|
||||
"azure": {
|
||||
"models": {
|
||||
"gpt-5-mini": {
|
||||
"gpt-6-luna": {
|
||||
"modelID": "gpt-production",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user