Compare commits

...

4 Commits

Author SHA1 Message Date
Aiden Cline
8b85247c75 docs: update variants docs 2025-12-31 01:16:06 -06:00
Aiden Cline
812b1ccb3b Merge branch 'dev' into variants-docs 2025-12-31 01:12:03 -06:00
Aiden Cline
636fa3527f tweak: minimax m2.1 topK and topP to match recommended values 2025-12-30 22:23:30 -06:00
David Hill
00e2ed04e7 fix: cleaner view subagents 2025-12-30 12:03:17 +00:00
2 changed files with 85 additions and 24 deletions

View File

@@ -43,6 +43,7 @@ OpenCode has a list of keybinds that you can customize through the OpenCode conf
"model_list": "<leader>m",
"model_cycle_recent": "f2",
"model_cycle_recent_reverse": "shift+f2",
"variant_cycle": "ctrl+t",
"command_list": "ctrl+p",
"agent_list": "<leader>a",
"agent_cycle": "tab",

View File

@@ -35,15 +35,13 @@ Consider using one of the models we recommend.
However, there are only a few of them that are good at both generating code and tool calling.
Here are several models that work well with OpenCode, in no particular order. (This is not an exhaustive list):
Here are several models that work well with OpenCode, in no particular order. (This is not an exhaustive list nor is it necessarily up to date):
- GPT 5.1
- GPT 5.2
- GPT 5.1 Codex
- Claude Opus 4.5
- Claude Sonnet 4.5
- Claude Haiku 4.5
- Kimi K2
- GLM 4.6
- Qwen3 Coder
- Minimax M2.1
- Gemini 3 Pro
---
@@ -107,30 +105,26 @@ The built-in provider and model names can be found on [Models.dev](https://model
You can also configure these options for any agents that you are using. The agent config overrides any global options here. [Learn more](/docs/agents/#additional).
You can also define custom models that extend built-in ones and can optionally use specific options by referring to their id:
You can also define custom variants that extend built-in ones. Variants let you configure different settings for the same model without creating duplicate entries:
```jsonc title="opencode.jsonc" {6-20}
```jsonc title="opencode.jsonc" {6-21}
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"opencode": {
"models": {
"gpt-5-high": {
"id": "gpt-5",
"name": "MyGPT5 (High Reasoning)",
"options": {
"reasoningEffort": "high",
"textVerbosity": "low",
"reasoningSummary": "auto",
},
},
"gpt-5-low": {
"id": "gpt-5",
"name": "MyGPT5 (Low Reasoning)",
"options": {
"reasoningEffort": "low",
"textVerbosity": "low",
"reasoningSummary": "auto",
"gpt-5": {
"variants": {
"high": {
"reasoningEffort": "high",
"textVerbosity": "low",
"reasoningSummary": "auto",
},
"low": {
"reasoningEffort": "low",
"textVerbosity": "low",
"reasoningSummary": "auto",
},
},
},
},
@@ -141,6 +135,72 @@ You can also define custom models that extend built-in ones and can optionally u
---
## Variants
Many models support multiple variants with different configurations. OpenCode ships with built-in default variants for popular providers.
### Built-in variants
OpenCode ships with default variants for many providers:
**Anthropic**:
- `high` - High thinking budget (default)
- `max` - Maximum thinking budget
**OpenAI**:
Varies by model but roughly:
- `none` - No reasoning
- `minimal` - Minimal reasoning effort
- `low` - Low reasoning effort
- `medium` - Medium reasoning effort
- `high` - High reasoning effort
- `xhigh` - Extra high reasoning effort
**Google**:
- `low` - Lower effort/token budget
- `high` - Higher effort/token budget
:::tip
This list is not comprehensive. Many other providers have built-in defaults too.
:::
### Custom variants
You can override existing variants or add your own:
```jsonc title="opencode.jsonc" {7-18}
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"openai": {
"models": {
"gpt-5": {
"variants": {
"thinking": {
"reasoningEffort": "high",
"textVerbosity": "low",
},
"fast": {
"disabled": true,
},
},
},
},
},
},
}
```
### Cycle variants
Use the keybind `variant_cycle` to quickly switch between variants. [Learn more](/docs/keybinds).
---
## Loading models
When OpenCode starts up, it checks for models in the following priority order: