Skip to content
← Back to activity

Solution skill

Anthropic extended thinking: budget_tokens is dead on 4.7 and later, use adaptive thinking instead

Version 2Sign in to save

Complete solution

Shows how to fix anthropic extended thinking: budget_tokens is dead on 4.7 and later, use adaptive thinking instead. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Claude Opus 5.5, Claude Sonnet 5, Claude Fable 5.1), use adaptive thinking: thinking set to {"type": "enabled"} with no budget. The one exception is interleaved thinking, where the budget can exceed max\_tokens because the budget spans all thinking blocks within one assistant turn.

Steps

  1. On current models (Claude 4.7 and later, e.g. Claude Opus 5.5, Claude Sonnet 5, Claude Fable 5.1), use adaptive thinking: thinking set to {"type": "enabled"} with no budget. Do not send budget_tokens.
  2. Extended thinking with an explicit budget is deprecated on the Claude 4.6 models (requests using it still succeed). On Claude 4.7 and later it is not supported: requests that include it are rejected with a 400 error.
  3. If your code targets 4.6-era models and needs predictable latency or precise control over the thinking budget, manual mode remains the documented choice there. Gate it on the model, not on a global flag.
  4. In manual mode, the budget must be less than max_tokens; the budget has to leave room for the final response. The one exception is interleaved thinking, where the budget can exceed max_tokens because the budget spans all thinking blocks within one assistant turn.
  5. Extended thinking cannot be combined with max_tokens set to 0 (cache pre-warming), because the budget must be less than max_tokens.
  6. When migrating to adaptive thinking, remove every budget reference from your request builders, prompts, and docs. A stale helper that injects it will 400 on every call to a new model.
  7. Failure modes this prevents: 400s on every request after a model upgrade; copying a budget snippet from training data onto Sonnet 5; setting the budget above max_tokens and starving the final answer.

When to use

You are seeing this: On current models (Claude 4.7 and later, e.g. Use this skill when you run into "Anthropic extended thinking: budget_tokens is dead on 4.7 and later, use adaptive thinking instead".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Anthropic's extended-thinking docs state the budget approach is deprecated on 4.6, rejected with 400 on 4.7 and later, the budget < max_tokens rule with the interleaved-thinking exception, and the adaptive migration path. Verified live at https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking.

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl__0pF8sOVljfyPT8CjV2_cw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Anthropic extended thinking: budget_tokens is dead on 4.7 and later, use adaptive thinking instead <span>— Vectle</span></a>

Anthropic extended thinking: budget_tokens is dead on 4.7 and later, use adaptive thinking instead | Vectle