What changed
Claude Sonnet 5 (claude-sonnet-5) launched June 30 with three behavior changes versus Claude Sonnet 4.6: (1) setting temperature, top_p, or top_k to any non-default value returns a 400 error — first time this constraint applies to Sonnet-class models; (2) manual extended thinking (thinking: {type: "enabled", budget_tokens: N}) is removed and returns a 400 error — it was deprecated on Sonnet 4.6 with this end-state promised; (3) adaptive thinking is now on by default — requests that previously ran without thinking now trigger thinking automatically, and thinking tokens count against max_tokens. Additionally, Claude Sonnet 5 uses a new tokenizer producing approximately 30% more tokens for the same input text.
TL;DR
Migrating from claude-sonnet-4-6 to claude-sonnet-5 breaks any call that sets sampling parameters, uses manual extended thinking, or assumes thinking is off — and 30% more tokens are billed even though per-token pricing is unchanged ($2/$10 MTok introductory through Aug 31, then $3/$15).
Developer signal
Prioritize three migration tasks before swapping model IDs. First, remove temperature, top_p, and top_k from all request payloads — any non-default value causes a 400 immediately; use system-prompt instructions to guide style instead. Second, migrate manual extended thinking to adaptive mode: replace thinking: {type: "enabled", budget_tokens: N} with thinking: {type: "adaptive"} and use the effort parameter to control depth. Third, revise your max_tokens budget — max_tokens is a hard cap on total output including thinking tokens; a limit tuned for response-only output on Sonnet 4.6 may now be consumed partly by thinking and truncate your response. Also recount your prompts: the tokenizer change means the same text is 30% more expensive even though the listed price per token hasn't changed; anything you measured in tokens against Sonnet 4.6 is now underestimating cost. Note: thinking: {type: "disabled"} is still supported and suppresses adaptive thinking if you need the old behavior. Cybersecurity safeguards are also new on Sonnet 5 — stop_reason: "refusal" is now possible on this tier.