Skip to content

feat: surface adaptive thinking mode for Anthropic 4.6 models in the UI #504

@tmustier

Description

@tmustier

Context

Anthropic's Opus 4.6 and Sonnet 4.6 use adaptive thinking — the model decides when and how much to think based on task complexity, rather than being given a fixed token budget. The upstream pi-ai provider (v0.58.1) already supports this: when a 4.6 model is selected, it sends thinking: { type: "adaptive" } instead of thinking: { type: "enabled", budget_tokens: N }, and maps our thinking levels to effort levels (low/medium/high/max).

The plumbing works. But the add-in UI doesn't distinguish between budget-based and adaptive thinking — users see the same level picker (off/low/med/high/max) with no indication that the underlying behavior is different.

Current behavior

  • Thinking level picker shows: off → low → med → high → max
  • Labels: THINKING_LEVEL_LABELS = { xhigh: "Max" }
  • Hints: THINKING_LEVEL_HINTS = { xhigh: "Slowest — deepest reasoning" }
  • Status bar: xhigh → "max"
  • Under the hood: pi-ai maps these to { type: "adaptive" } + effort levels for 4.6 models

What could improve

1. Thinking level hints should mention adaptive behavior for 4.6 models

Currently "Slowest — deepest reasoning" doesn't tell the user that the model will adaptively choose how much to think. Something like "Adaptive — model chooses reasoning depth" for the default level, and "Adaptive — maximum reasoning effort" for xhigh.

2. Consider making "adaptive" the recommended default for 4.6 models

The current default for reasoning-capable models is "high" (src/taskpane/init.ts:908). For adaptive-thinking models, a dedicated "adaptive" level (or just defaulting to medium and letting the model decide) may produce better cost/quality tradeoffs than always-high.

3. Status bar could show thinking mode

E.g. "adaptive: high" vs "budget: high" — or just an icon/indicator when adaptive mode is active.

4. Thinking duration display

src/compat/thinking-duration.ts shows elapsed thinking time. For adaptive thinking, the duration is more variable — consider showing whether the model chose to think at all (some simple queries may skip thinking entirely in adaptive mode).

Key files

  • src/taskpane/keyboard-shortcuts.tsgetThinkingLevels(), THINKING_COLORS
  • src/taskpane/status-popovers.tsTHINKING_LEVEL_LABELS, THINKING_LEVEL_HINTS
  • src/taskpane/status-bar.ts — status bar thinking display
  • src/taskpane/init.ts:908 — default thinking level selection
  • src/compat/thinking-duration.ts — thinking time display
  • node_modules/@mariozechner/pi-ai/dist/providers/anthropic.jssupportsAdaptiveThinking(), effort mapping
  • node_modules/@mariozechner/pi-ai/dist/models.jssupportsXhigh()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions