Skip to content

Support for reasoning_effort parameter in UI #450

Closed

Description

@unkn0wncode

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.

Activity

  1. self-assigned this
    on Jun 27, 2025
  2. johnpyp commented on Jun 30, 2025

    @johnpyp

    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:

    HIGHEST - 100% thinking budget
    MIDDLE - 31.25% thinking budget
    BASIC - 12.5% thinking budget
    DEFAULT - 0% of course
    

    Reference for claude code's thinking token thresholds and keywords:

    HIGHEST (token: 31,999)
    
        "think harder"
    
        "think intensely"
    
        "think longer"
    
        "think really hard"
    
        "think super hard"
    
        "think very hard"
    
        "ultrathink"
    
    MIDDLE (token: 10,000)
    
        "think about it"
    
        "think a lot"
    
        "think deeply"
    
        "think hard"
    
        "think more"
    
        "megathink"
    
    BASIC (token: 4,000)
    
        "think"
    
    NONE (token: 0)
    
        (empty)
    
  3. pascalandy commented on Jul 12, 2025

    @pascalandy

    Need a flag

    I'm also looking for such a flag. Here is an example for llm by Simon Willison

    llm -m openai/o3 "ping"
    
    llm -m openai/o3 -o reasoning_effort high "ping"

    Why I want this

    from Aider leaderboard

    Image

    Think about the gap between 65% (Sonnet 4, ultrathink) and 84% (o3-high) 🧠

    from Codex

    Also, here is PR in Codex - openai/codex#314

  4. asafyish commented on Aug 11, 2025

    @asafyish

    Can be considered fixed since d8dc23b ?

  5. jamesponddotco commented on Aug 15, 2025

    @jamesponddotco

    Not sure that works:

    "provider": {
        "openai": {
          "models": {
            "gpt-5": {
              "options": {
                "reasoningEffort": "high"
              }
            }
          }
        },
        "anthropic": {
          "models": {
            "claude-sonnet-4-20250514": {
              "options": {
                "thinking": {
                  "type": "enabled",
                  "budget_tokens": 32000
                }
               }
            }
          }
        }
      },

    When using Claude Sonnet I now get:

    AI_UnsupportedFunctionalityError: 'thinking requires a budget' functionality not supported.
    

    The error goes away if I remove the options. Maybe I'm passing them wrong?

    EDIT: Nevermind, just change budget_tokens to budgetTokens. That's what the ai package used by opencode expects.

  6. asafyish commented on Aug 16, 2025

    @asafyish

    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.

  7. carterworks commented on Aug 21, 2025

    @carterworks
    Contributor

    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.

  8. f5epcim commented on Aug 22, 2025

    @f5epcim

    I would like to mention this problem, related to private endpoint, where reasoningEffort is rejected and is epxected reasoning_effort. #1859 (comment)

  9. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

    [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

  10. jackfruitsandwich commented on Jan 22, 2026

    @jackfruitsandwich

    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

  11. pascalandy commented on Jan 22, 2026

    @pascalandy

    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

  12. maxevilmind commented on May 15, 2026

    @maxevilmind

    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?

  13. sekedus commented on Jun 10, 2026

    @sekedus

    OpenCode stores model thinking efforts and user preferences in:

    • macOS and Linux: ~/.local/state/opencode
    • Windows: %USERPROFILE%\.local\state\opencode

    See #6156 (comment)

  14. maxevilmind commented on Jun 18, 2026

    @maxevilmind

    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.

  15. sekedus commented on Jun 18, 2026

    @sekedus

    but reasoning in opencode is switched with ctrl+T.

    https://opencode.ai/docs/tui/#thinking

  16. disarticulate commented on Jun 26, 2026

    @disarticulate

    why is this closed? here's how llama.cpp manages fine grained control: ggml-org/llama.cpp#21445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions