Claude Opus 5 returns 400 on temperature. What to do

Three request fields now hard-fail on Claude Opus 4.7 and newer: `temperature`, `top_p` and `top_k`, plus manual `thinking.budget_tokens`.

The fix is deletion, not translation: omit the sampling fields, and replace `budget_tokens` with the `effort` control.

The same model generation ships a new tokenizer that can turn identical input into roughly 30% more tokens, per [Anthropic's migration

Read the full post

Read the full post