Skip to content

fix(models): request visible thinking summaries on adaptive-thinking models - #308

Merged
philipph-askui merged 1 commit into
mainfrom
fix/thinking-display-summarized
Aug 13, 2026
Merged

fix(models): request visible thinking summaries on adaptive-thinking models#308
philipph-askui merged 1 commit into
mainfrom
fix/thinking-display-summarized

Conversation

@philipph-askui

Copy link
Copy Markdown
Contributor

Why

Models of the Sonnet 5 generation onward default the thinking display setting to "omitted": the API returns thinking blocks whose text is empty (signature only), while the full thinking tokens are still billed (usage.output_tokens_details.thinking_tokens). Every consumer of make_thinking_settings() therefore silently loses all visible reasoning in reports and logs on the newest models — bitten in production by the TCPos test-automation project, where HTML reports showed 175/175 empty thinking blocks.

Older adaptive models (Sonnet 4.6 / Opus 4.6) default display to summarized, which is why the gap only appears from Sonnet 5 onward.

What

make_thinking_settings() now returns thinking={"type": "adaptive", "display": "summarized"} for adaptive models. Billing is identical for both display modes (docs) — this only restores visibility. The legacy budget_tokens branch is unchanged.

Verification

  • pytest tests/unit/models/test_thinking.py — 54 passed (assertions updated)
  • ruff check / ruff format --check clean on changed files
  • Live end-to-end against Vertex claude-sonnet-5 (rawPredict, eu + global endpoints): empty thinking text before, 3,162 chars of summarized thinking after — with identical thinking_tokens billed

Notes

Same follow-up as #302: the C# SDK carries a port of this module — mirroring PR opened in askui/csharp-sdk.

🤖 Generated with Claude Code

…models

Models of the Sonnet 5 generation onward default the thinking `display`
setting to "omitted": the API returns thinking blocks whose text is empty
while the full thinking tokens are still billed. Any consumer relying on
make_thinking_settings() therefore silently loses all visible reasoning in
reports and logs on the newest models.

Set display: "summarized" explicitly in the adaptive branch. Billing is
identical for both display modes, so this only restores visibility.
Verified end-to-end against Vertex claude-sonnet-5 (empty before, 3k chars
of summarized thinking after).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@philipph-askui

Copy link
Copy Markdown
Contributor Author

C# mirroring PR: askui/csharp-sdk#18 — should land in step (same parity rule as #302 ↔ csharp-sdk#16).

Comment thread src/askui/models/shared/thinking.py
@philipph-askui
philipph-askui merged commit 988991d into main Aug 13, 2026
1 check passed
@philipph-askui
philipph-askui deleted the fix/thinking-display-summarized branch August 13, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants