Skip to content

Anthropic adaptive thinking models show wrong effort levels in UI #2397

Description

@dpearson2699

Problem

The thinking/effort level UI shows OpenAI-centric levels (off/minimal/low/medium/high/xhigh) for all providers, including Anthropic models that use the adaptive thinking API. This is incorrect and confusing for Anthropic models.

Anthropic adaptive thinking (Opus 4.6, Sonnet 4.6)

The Anthropic API defines effort levels as:

  • low — Minimal thinking, skips for simple tasks
  • medium — Moderate thinking, may skip for simple queries
  • high — Always thinks, deep reasoning (default)
  • max — Always thinks with no constraints (Opus 4.6 only)

Additionally, omitting the effort parameter (null) lets the model decide autonomously — effectively "auto" mode.

What the UI currently shows

For all reasoning models:

  • off / minimal / low / medium / high (standard)
  • off / minimal / low / medium / high / xhigh (for models where supportsXhigh() returns true)

Issues

  1. Duplicate levels: minimal and low both map to Anthropic's low in mapThinkingLevelToEffort() — they're indistinguishable
  2. Wrong naming: xhigh is shown instead of max, which is what Anthropic's API calls it
  3. Missing auto: No way to let the model decide when/how much to think (Anthropic's default adaptive behavior when no effort is specified)
  4. Sonnet 4.6 excluded: supportsXhigh() in models.ts only returns true for Opus 4.6 on the anthropic-messages API, but Sonnet 4.6 also supports adaptive thinking (just not max)
  5. THINKING_DESCRIPTIONS are misleading: Token budget descriptions like "~1k tokens" and "~8k tokens" don't apply to adaptive thinking, which doesn't use token budgets

Affected files

packages/ai:

  • src/types.tsThinkingLevel type is provider-agnostic but values are OpenAI-centric
  • src/models.tssupportsXhigh() doesn't account for provider-specific level sets
  • src/providers/anthropic.ts — has correct mapping internally (mapThinkingLevelToEffort), but the UI layer has no way to know the actual provider levels

packages/coding-agent:

  • src/core/agent-session.tsTHINKING_LEVELS / THINKING_LEVELS_WITH_XHIGH constants and getAvailableThinkingLevels() are not provider-aware
  • src/modes/interactive/components/settings-selector.tsTHINKING_DESCRIPTIONS and level labels are hardcoded
  • src/modes/interactive/interactive-mode.tscycleThinkingLevel() cycles through the wrong set
  • src/cli/args.tsVALID_THINKING_LEVELS validation

packages/web-ui:

  • src/components/MessageEditor.ts — hardcoded off/minimal/low/medium/high options

Expected behavior

When an Anthropic adaptive thinking model is selected:

  • Show effort levels: off / low / medium / high / max (and auto if supported)
  • Use Anthropic's own terminology in labels and descriptions
  • Descriptions should reference adaptive thinking behavior, not token budgets

When an OpenAI model is selected:

  • Continue showing: off / minimal / low / medium / high (and xhigh for supported models)

Reference

The GitHub Copilot Anthropic integration already uses these correct levels (low/medium/high/max) with the adaptive thinking API. See Anthropic SDK OutputConfig.effort: 'low' | 'medium' | 'high' | 'max' | null.

Metadata

Metadata

Assignees

No one assigned

    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