You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't find references of reasoning effort in the code at the moment, but multiple models support it, including OpenAI models, Gemini, Deepseek, and more.
Would be ideal to have it implemented in UI for supported models, similar to how /models command works.
In a similar vein, supporting things like ultrathink from claude code would be great to dynamically increase the reasoning effort.
Might need some tuning thresholds for specific popular models, and perhaps just a % of the limit for other models which don't have their own hardcoded.
Since claude has 32k as the max thinking, a good starting place could be mirroring it with:
I think this issue can be closed since there at least 2 possible ways to enable high reasoningEffort.
I believe the core of this issue is different. You've describe ways to persistently enable a thinking budget ("always use high reasoning effort") but this issue is asking for a way to set it dynamically ("use high reasoning effort just for this next request"). Claude Code does it through env variables (MAX_THINKING_TOKENS) and through message keywords ("ultrathink").
There isn't currently a way to set reasoning effort for a single request, like there is in Claude Code.
no reasoning effort control is the only reason I don't use opencode. gpt-5.2-xhigh is my main model and there is no way to use it with my codex subscription through opencode
why this is closed? why is it hard to support choosing reasoning effort from the UI? You can only set it first time you start using model, why can't we have a menu option to just switch it in UI?
Reacted by bnn1, Raffael Herrmann, Sekedus, Gaël and DY
Activity
johnpyp commentedon Jun 30, 2025
In a similar vein, supporting things like
ultrathinkfrom claude code would be great to dynamically increase the reasoning effort.Might need some tuning thresholds for specific popular models, and perhaps just a % of the limit for other models which don't have their own hardcoded.
Since claude has 32k as the max thinking, a good starting place could be mirroring it with:
Reference for claude code's thinking token thresholds and keywords:
pascalandy commentedon Jul 12, 2025
Need a flag
I'm also looking for such a flag. Here is an example for
llmby Simon WillisonWhy I want this
from Aider leaderboard
Think about the gap between 65% (Sonnet 4, ultrathink) and 84% (o3-high) 🧠
from Codex
Also, here is PR in Codex - openai/codex#314
asafyish commentedon Aug 11, 2025
Can be considered fixed since d8dc23b ?
jamesponddotco commentedon Aug 15, 2025
Not sure that works:
When using Claude Sonnet I now get:
The error goes away if I remove the options. Maybe I'm passing them wrong?
EDIT: Nevermind, just change
budget_tokenstobudgetTokens. That's what theaipackage used by opencode expects.asafyish commentedon Aug 16, 2025
This is the config I use and it's verified working in openai dashboard logs:
{ "$schema": "https://opencode.ai/config.json", "provider": { "openai": { "models": { "gpt-5": { "options": { "reasoningSummary": "auto", "include": [ "reasoning.encrypted_content" ] } } } } }, "agent": { "gpt-5-max": { "model": "openai/gpt-5", "description": "Agent that uses high reasoning effort for complex problems", "reasoningEffort": "high", "textVerbosity": "low" } } }I think this issue can be closed since there at least 2 possible ways to enable high reasoningEffort.
carterworks commentedon Aug 21, 2025
I believe the core of this issue is different. You've describe ways to persistently enable a thinking budget ("always use high reasoning effort") but this issue is asking for a way to set it dynamically ("use high reasoning effort just for this next request"). Claude Code does it through env variables (
MAX_THINKING_TOKENS) and through message keywords ("ultrathink").There isn't currently a way to set reasoning effort for a single request, like there is in Claude Code.
f5epcim commentedon Aug 22, 2025
I would like to mention this problem, related to private endpoint, where reasoningEffort is rejected and is epxected reasoning_effort. #1859 (comment)
rekram1-node commentedon Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
jackfruitsandwich commentedon Jan 22, 2026
no reasoning effort control is the only reason I don't use opencode. gpt-5.2-xhigh is my main model and there is no way to use it with my codex subscription through opencode
pascalandy commentedon Jan 22, 2026
I open sourced my config.
I spent a lot of time configuring my open code setup. up. I'm still not sure it's perfect but it works good at this point.
The trick here is to be aware that there's a big difference between the provider and the agents.
providers:
https://github.com/pascalandy/dotfiles/blob/main/dot_config/opencode/opencode.json.tmpl
agents:
https://github.com/pascalandy/dotfiles/blob/main/dot_config/opencode/config.json
feat: change toxikat toolOutput color to anomalyco#450
maxevilmind commentedon May 15, 2026
why this is closed? why is it hard to support choosing reasoning effort from the UI? You can only set it first time you start using model, why can't we have a menu option to just switch it in UI?
sekedus commentedon Jun 10, 2026
OpenCode stores model thinking efforts and user preferences in:
~/.local/state/opencode%USERPROFILE%\.local\state\opencodeSee #6156 (comment)
maxevilmind commentedon Jun 18, 2026
Ok so apparently this is being kept a secret (I have no other explanation why everyone keeps saying configs e.t.c),
but reasoning in opencode is switched with ctrl+T.
You are welcome everyone stumbling upon it.
sekedus commentedon Jun 18, 2026
https://opencode.ai/docs/tui/#thinking
disarticulate commentedon Jun 26, 2026
why is this closed? here's how llama.cpp manages fine grained control: ggml-org/llama.cpp#21445