OpenCode reasoning effort
Reasoning and thinking models bill extra output tokens for internal chains before the visible reply. OpenCode exposes provider options like reasoningEffort and budgetTokens per model and per agent.
This page answers opencode change reasoning effort, opencode no thinking, and custom provider thinking options.
Hub: Tokenminning in OpenCode.
Change reasoning effort
Configure at provider model level and override per agent in opencode.json (Models ):
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"anthropic": {
"models": {
"claude-sonnet-4-5": {
"options": {
"reasoningEffort": "low"
}
}
}
}
},
"agent": {
"plan": {
"model": "anthropic/claude-haiku-4-20250514"
},
"build": {
"model": "anthropic/claude-sonnet-4-5",
"options": {
"reasoningEffort": "medium"
}
}
}
}| Setting | Token effect |
|---|---|
reasoningEffort | Higher → more thinking tokens before answer |
budgetTokens | Caps reasoning budget when provider supports it |
| Thinking model on Plan | Overhead on questions Haiku could handle |
Turn off thinking
To disable thinking on a route:
- Pick a non-reasoning model ID (no
-thinking/ extended-reasoning variant) - Set lowest
reasoningEffortyour provider allows - Do not set thinking models as the global
modeldefault
For opencode no thinking on Plan specifically, assign Haiku or a non-reasoning mid-tier to agent.plan only.
Thinking budgets (custom providers)
OpenRouter and custom OpenAI-compatible gateways often expose thinking controls via provider options. Example pattern:
{
"provider": {
"openrouter": {
"models": {
"anthropic/claude-sonnet-4-5": {
"options": {
"reasoningEffort": "low",
"budgetTokens": 8000
}
}
}
}
}
}Exact keys depend on the provider — verify in Providers and your gateway docs. Wrong options silently fall back to provider defaults.
When reasoning is worth it
| Task | Model |
|---|---|
| Grep-style questions, plan review | Haiku / mid-tier, no thinking |
| Multi-file refactor | Capable model, moderate effort |
| Novel architecture, deep debug | Thinking variant, scoped prompt |
Use Plan with cheap models; escalate effort only on Build after you approve the approach.
Subagents and parallel thinking
@general, @scout, and Task-delegated subagents spawn sessions with their own context and model choices. Restrict with permission.task; prefer read-only @explore for search.
Each parallel subagent can run thinking models independently — multiply overhead fast.
Troubleshooting
High output on simple tasks — Thinking default on Plan. Switch Plan to Haiku; lower reasoningEffort.
Effort change ignored — Options must match provider + model ID in config. Check Providers merge order.
Stats spike after model change — New conversation when switching models; cache behavior resets.