## TL;DR

Remove the interleaved-thinking-2025-05-14 beta header after migrating to adaptive: adaptive interleaves automatically. 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.

## Steps

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

2. - 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.

3. 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.

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

## When to use

You are seeing this: Match the generation: if you moved forward, migrate; if you moved back, restore the old parameter. Use this skill when you run into "Anthropic 400 on the thinking parameter right after a model upgrade: enabled vs adaptive depends on the generation".

## 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

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

## Edge cases

- Note the first request after any mode switch invalidates cache breakpoints once, then caching resumes.
