Extended Thinking & Budget Tokens — Extended Thinking & Adaptive Reasoning
Extended Thinking & Budget Tokens
From Manual Budget Tokens to Adaptive Reasoning
Anthropic pioneered Extended Thinking on Claude 3.7 Sonnet (retired Feb 19, 2026) and legacy Claude 4.5 models (claude-haiku-4-5), enabling the model to emit a verifiable internal chain of thought (type: "thinking") before its final answer. Important October 2026 Migration Rule: Starting with Claude 4.7 and across all Claude 5.x models (Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5), manual budget_tokens (type: "enabled") is deprecated and rejected with an HTTP 400 error—replaced by thinking: { type: "adaptive" } and output_config.effort.
Legacy budget_tokens Schema (Haiku 4.5 Maintenance Only)
{
"model": "claude-haiku-4-5",
"max_tokens": 16000,
"thinking": {
"type": "enabled",
"budget_tokens": 4096
},
"messages": [
{ "role": "user", "content": "Write an optimized red-black tree in Rust with full invariant tests." }
]
}
Critical API Rules for Thinking Blocks:
- Claude 5.x Standard: Use
thinking: { type: "adaptive" }+output_config: { effort: "low" | "medium" | "high" | "max" }(passingbudget_tokensortemperatureon 5.x throws HTTP 400). - Legacy Minimum Budget (4.5 only): Where supported on legacy 4.5 endpoints,
budget_tokensrequired at least 1,024 tokens andmax_tokens > budget_tokens. - Signed Thinking Blocks: The API returns thinking inside a
thinkingblock accompanied by a cryptographicsignature. In multi-turn tool loops, thinking blocks must be passed back unmodified.
Legacy models (such as Claude Haiku 4.5 and retired Claude 3.7 Sonnet) used manual budget_tokens, whereas Claude 5.5 models reject budget_tokens (HTTP 400) in favor of adaptive thinking. Inspect the legacy budget_tokens contract on claude-haiku-4-5.