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