AI / Claude Sonnet5 Interview questions
How does Claude Sonnet 5 handle assistant message prefilling?
Assistant message prefilling - constructing a request that starts the assistant's response with predetermined text - returns an HTTP 400 error on Claude Sonnet 5, the same rejection behavior that was already true on Claude Sonnet 4.6.
This means prefill rejection isn't a new Sonnet-5-specific breaking change to account for during a straightforward Sonnet-4.6-to-Sonnet-5 migration - it was already in place before Sonnet 5 shipped, for teams already running on 4.6.
For teams migrating from an older, pre-4.6 Sonnet version where prefilling was still accepted, this is one of the additional changes that needs to be handled as part of that longer migration path, using structured outputs, system prompt instructions, or the platform's output-format configuration as alternatives instead.
More Related questions...