Skip to content

Reasoning effort is hardcoded — no way to select high/xhigh reasoning tiers for OpenAI or Anthropic models #1240

Description

@patpatpat123

What happened?

ProxyAI gives no way to control reasoning effort. Whatever tier a model supports, the plugin picks one fixed level and there is no setting, dropdown, or config field to change it. For anyone paying for a top-tier subscription specifically to get the highest reasoning modes (Claude's extended-thinking tiers, GPT-5.x high/xhigh reasoning), that capability is unreachable through this plugin.

Three separate paths, all hardcoded:

  1. OpenAI — pinned to MEDIUM. AgentFactory.kt:263-268 is the only place effort is ever set:

    return base.copy(
        reasoning = base.reasoning ?: ReasoningConfig(
            effort = ReasoningEffort.MEDIUM,
            summary = ReasoningSummary.AUTO
        )
    )

    No branch, no settings read, no override.

  2. Anthropic — thinking budget hard-capped at 2,048 tokens. AgentFactory.kt:292-300:

    return (limit / 2)
        .coerceAtLeast(ANTHROPIC_MIN_THINKING_BUDGET)     // 512
        .coerceAtMost(ANTHROPIC_DEFAULT_THINKING_BUDGET)  // 2_048

    The budget is clamped to ≤2,048 regardless of model or configured max output tokens — far below what the models support.

  3. ProxyAI-hosted provider — no reasoning params sent at all. withReasoningParams (AgentFactory.kt:232-247) dispatches on the Koog LLMProvider. ProxyAI models are built with virtualModel(ProxyAILLMClient.ProxyAI, ...) (ModelProvider.kt:407), which is LLMProvider("proxyai", "ProxyAI") (ProxyAILLMClient.kt:75), so they fall into else -> params. Claude and GPT models accessed via ProxyAI get zero reasoning configuration.

There is also no UI for any of this — grep -rniE "reasoning|thought.?level|effort" over settings/ and messages/ returns two incidental hits, neither a control.


Field 2 — "Proposed solution"

  1. Add a reasoning-effort selection alongside the existing per-FeatureType model selection in ModelSettings / ModelSettingsForm, surfaced in the model dropdown the way the ACP runtime already does it — AcpConfigCategories.THOUGHT_LEVEL (AcpAgentService.kt:889) plus AgentRuntimeOptionsComboBoxAction already implement exactly this UX for external agents, so the pattern exists in-tree.
  2. Plumb the selection into withReasoningParams instead of the hardcoded ReasoningEffort.MEDIUM.
  3. Extend asReasoningEffort (CustomOpenAIParams.kt:202-211) beyond none|minimal|low|medium|high to cover the newer xhigh tier.
  4. Derive the Anthropic thinking budget from the selected tier rather than clamping to 2,048, and let it scale with the model's real limits.
  5. Extend the same handling to the ProxyAI-hosted provider so the top tiers are reachable on the default configuration.

Field 3 — "Additional context"

Today the only workaround is the Custom OpenAI provider with a free-form body param — reasoning_effort is not in CUSTOM_OPENAI_RESERVED_BODY_KEYS (CustomOpenAIParams.kt:74-88), so it survives into additionalProperties and is flattened onto the request verbatim by CustomOpenAIAdditionalPropertiesFlatteningSerializer (CustomOpenAILLMClient.kt:569-582). That requires abandoning the built-in providers entirely.

Related bug worth fixing alongside: on the Responses endpoint the nested form {"reasoning": {"effort": "xhigh"}} is silently downgraded. reasoning is reserved (CustomOpenAIParams.kt:95), asReasoningEffort returns null for any unrecognised value, and the null then falls back to the upstream MEDIUM (:57-64). No warning, no error — the user believes they set a higher tier and did not.

Relevant log output or stack trace

Steps to reproduce

No response

CodeGPT version

all

Operating System

macOS

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions