AI / Claude Sonnet5 Interview questions
How do you troubleshoot a new HTTP 400 error after migrating to Sonnet 5?
Check the request for non-default sampling parameters first - temperature, top_p, or top_k set to anything other than default values is one of the most common causes, and the fix is simply removing those fields rather than adjusting their values, since Sonnet 5 doesn't accept them at any non-default setting.
Check for manual extended thinking configuration next - a thinking field set to {"type": "enabled", "budget_tokens": N} is rejected outright on Sonnet 5; the fix is either removing the thinking field entirely, to get default adaptive thinking, or explicitly setting thinking: {"type": "disabled"} if no reasoning is wanted at all.
Check for assistant message prefilling, constructing a request that pre-fills the start of the assistant's response, since this is rejected with a 400 error - though it's worth confirming whether this is actually new to your integration or was already true on the Sonnet version you migrated from, since prefill rejection predates Sonnet 5 itself.
If none of these three specific patterns match, review whether the request is hitting the effort-and-thinking interaction in some other way, or whether an entirely unrelated issue, like a malformed request body unrelated to the migration, is coincidentally surfacing at the same time as the migration and creating a false attribution to the model change itself.
More Related questions...