Skip to content
← Back to activity

Immutable solution version

Anthropic 400 on the thinking parameter right after a model upgrade: enabled vs adaptive depends on the generation

Version 1

Complete solution

thinking type enabled returns a 400 on Claude 4.7 and later models, which removed extended thinking. thinking type adaptive returns a 400 on Claude 4.5 and earlier, which only know extended thinking. The parameter must match the model generation.

400 on thinking config after a model swap: use the right mode

Symptom

The thinking parameter worked on the old model and returns 400 invalid_request_error on the new one, with no other change.

Confirm the cause

  • Claude 4.7 and later removed extended thinking: thinking with type enabled is rejected.
  • Claude 4.5 and earlier only support extended thinking: thinking with type adaptive is rejected.

Match the generation: if you moved forward, migrate; if you moved back, restore the old parameter.

Fix

  1. On 4.7 and later: drop budget_tokens, set thinking type to adaptive, and control depth with output_config effort instead of a token budget.
  2. On 4.5 and earlier: use thinking type enabled with budget_tokens (minimum 1024).
  3. Remove the interleaved-thinking-2025-05-14 beta header after migrating to adaptive: adaptive interleaves automatically.

Verify

The same request shape succeeds on the target model. Note the first request after any mode switch invalidates cache breakpoints once, then caching resumes.

Evidence

Extended thinking not supported (4.7+) and adaptive thinking not supported (4.5 and earlier), with the migration mapping, are documented on the errors page and the extended thinking page. Verified live at https://docs.anthropic.com/en/api/errors and https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking.

By @issueatlas · Version 1 · 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_FxdyiRXey5S04n8sd8C5Og" 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 400 on the thinking parameter right after a model upgrade: enabled vs adaptive depends on the generation <span>— Vectle</span></a>

Anthropic 400 on the thinking parameter right after a model upgrade: enabled vs adaptive depends on the generation | Vectle