Skip to content

fix(anthropic): default adaptive thinking display to summarized#3415

Merged
Sayt-0 merged 1 commit into
mainfrom
fix/anthropic-default-thinking-display
Jul 2, 2026
Merged

fix(anthropic): default adaptive thinking display to summarized#3415
Sayt-0 merged 1 commit into
mainfrom
fix/anthropic-default-thinking-display

Conversation

@Sayt-0

@Sayt-0 Sayt-0 commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

Effort levels set via /effort or the Shift+Tab thinking cycle showed no reasoning in the TUI on newer Claude models (Opus 4.7+, Fable 5). Those models omit thinking content server-side by default, and docker-agent only sent the adaptive display field when provider_opts.thinking_display was configured.

/effort | Shift+Tab
  -> runtime override: ThinkingBudget{Effort: ...}
  -> anthropic: thinking.type=adaptive + output_config.effort
  -> display field only sent when thinking_display is configured
  -> server default on Opus 4.7+/Fable 5 = omitted
  -> only the signature is returned, no thinking blocks, TUI shows nothing

Fix

Request summarized thinking whenever adaptive/effort-based thinking is used without an explicit thinking_display, on both the GA and Beta request paths. thinking_display: omitted remains the explicit opt-out.

Case Before After
Adaptive/effort, no thinking_display, Opus 4.7+/Fable 5 no display sent, API defaults to omitted, reasoning hidden display=summarized, reasoning visible
Adaptive/effort, no thinking_display, Opus 4.6/Sonnet 4.6 no display sent, API defaults to summarized display=summarized, unchanged behavior
Explicit thinking_display honored honored
Token-count budgets no display sent unchanged (API already defaults to summarized)

Changes

  • pkg/model/provider/anthropic/thinking.go: defaultAdaptiveDisplay applied in applyThinkingConfig and applyBetaThinkingConfig
  • pkg/model/provider/anthropic/thinking_test.go: adaptive cases now expect summarized; new Fable 5 cases (default summarized, explicit omitted preserved)
  • Docs: Thinking Display sections updated (docs/guides/thinking, docs/providers/anthropic, docs/configuration/models)

Validation

  • go build ./..., go test ./pkg/model/... ./pkg/modelinfo/... ./pkg/runtime/... ./pkg/effort/...: pass
  • golangci-lint run and go run ./lint .: 0 issues
  • Docs YAML snippets validated by TestDocYAMLSnippetsAreValid

Notes

  • The Bedrock provider also sends thinking.type=adaptive without a display field; if the same gap applies there, it can be addressed in a follow-up.
  • A model-gated alternative (a modelinfo.HidesThinkingByDefault predicate) was considered; the unconditional default was preferred because it is a no-op for models whose server default is already summarized and automatically covers future models that hide thinking by default.

Newer Claude models (Opus 4.7+, Fable 5) omit thinking content
server-side by default, so effort levels set via /effort or the
Shift+Tab cycle silently hid all reasoning in the TUI. Request
summarized thinking whenever adaptive thinking is used without an
explicit thinking_display; "omitted" remains the opt-out.
@Sayt-0 Sayt-0 requested a review from a team as a code owner July 2, 2026 12:22
@aheritier aheritier added area/docs Documentation changes area/providers/anthropic For features/issues/fixes related to the usage of Anthropic models kind/fix PR fixes a bug (maps to fix:). Use on PRs only. labels Jul 2, 2026
@Sayt-0 Sayt-0 merged commit 551b0ce into main Jul 2, 2026
16 checks passed
@Sayt-0 Sayt-0 deleted the fix/anthropic-default-thinking-display branch July 2, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation changes area/providers/anthropic For features/issues/fixes related to the usage of Anthropic models kind/fix PR fixes a bug (maps to fix:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants