Skip to content

[ENHANCEMENT] Add Adaptive Thinking support for Claude Opus 4.6 and Sonnet 4.6 #11732

@dk-d3v

Description

@dk-d3v

Problem (one or two sentences)

When using Claude Opus 4.6 or Sonnet 4.6, users cannot leverage Anthropic's new adaptive thinking mode. They are limited to manually setting a fixed thinking budget (budget_tokens), which is now deprecated on these models. Adaptive thinking provides better performance for bimodal tasks and agentic workflows by letting Claude dynamically determine when and how much to think.

Context (who is affected and when)

All Roo Code users who select claude-opus-4-6 or claude-sonnet-4-6 as their model via the Anthropic provider. Currently they can only use the legacy fixed-budget extended thinking, missing out on the recommended adaptive mode.

Desired behavior (conceptual, not technical)

When a user selects Claude Opus 4.6 or Sonnet 4.6, a new "Use Adaptive Thinking" checkbox should appear in the provider settings. When enabled, Claude dynamically determines when and how much to use extended thinking based on request complexity. Users should also be able to select an effort level (low/medium/high, plus "max" for Opus only) to guide how much thinking Claude does. The Max Output Tokens slider should remain visible regardless of the thinking mode chosen.

Constraints / preferences (optional)

  • Adaptive thinking uses thinking: {type: "adaptive"} (separate top-level param from the effort output_config)
  • "max" effort level is only available on claude-opus-4-6; should gracefully fall back to "high" on Sonnet
  • The existing manual budget mode (budget_tokens) should remain available as an alternative when adaptive thinking is off
  • Max Output Tokens slider must always be visible — it's independent of the thinking mode
  • Localization: all UI strings should be translated across all 18 supported languages

Request checklist

  • I've searched existing Issues and Discussions for duplicates
  • This describes a specific problem with clear context and impact

Roo Code Task Links (optional)

No response

Acceptance criteria (optional)

Given claude-opus-4-6 or claude-sonnet-4-6 is selected as the model
When the user enables "Use Reasoning"
Then a "Use Adaptive Thinking" checkbox appears
And when checked, an effort level dropdown (low/medium/high/max) is shown
And the Max Output Tokens slider remains visible
And the Max Thinking Tokens slider is hidden (Claude manages thinking budget)
And API requests use thinking: {type: "adaptive"} with output_config: {effort: "<level>"}
But "max" effort on Sonnet gracefully falls back to "high"

Proposed approach (optional)

  1. Add supportsAdaptiveThinking and supportsAdaptiveThinkingMaxEffort flags to ModelInfo
  2. Add useAdaptiveThinking (boolean) and adaptiveThinkingEffort (low/medium/high/max) to ProviderSettings
  3. Update ThinkingBudget.tsx to show adaptive thinking UI when model supports it
  4. Update getAnthropicReasoning() to return {type: "adaptive"} and getAnthropicOutputConfig() for effort
  5. Add i18n strings for all 18 languages
  6. Add unit tests for the reasoning transform functions

Trade-offs / risks (optional)

  • Adaptive thinking is only supported on Opus 4.6 and Sonnet 4.6; older models must continue using budget_tokens
  • The "max" effort level generates significantly more thinking tokens (higher cost); clear UI labeling needed
  • Switching between adaptive and manual mode breaks prompt cache breakpoints for messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions