Files
Christian A.andCopilot App 165ef3fe9f LLM - Thinking budget "Off" also switches thinking off for Claude Haiku/Sonnet 5.x (#4658)
Claude Haiku 5.5, Sonnet 5 and Sonnet 5.5 think by default, so the JSON eval
calls spend most of their output tokens on thinking (Haiku 5.5: 1643 out
tokens for a ~400 char answer). With the thinking budget at Off (the default)
send thinking={'type': 'disabled'}, or 'between_tools' on Sonnet 5.5 which
rejects 'disabled'. Claude 5.x has no thinking token budget any more, so
non-zero budgets keep the provider default. Opus 5 (leaks <thinking> tags
with thinking disabled), Opus 5.5 / Fable (thinking always on) and 4.x are
left alone.

Anthropic rejects unknown body fields, so client.completion() passes
'thinking' as a top-level litellm param instead of extra_body for Anthropic
models, and drops it on a BadRequest retry only when the error is about
thinking.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-04 12:19:17 +01:00
..
2021-12-10 12:08:51 +01:00
2025-01-21 13:40:01 +01:00