reproduction: Empty assistant message sent to provider after unsigned
Draft
AI
3mo ago+218+218+012345678901234567890123456789-0-0-0123456789
Bug
Empty assistant message sent to provider after unsigned reasoning is dropped on replay -> Bedrock 400, bricks conversation
Reproduction
- A live Bedrock call using the checked-out
ai@7.0.52and@ai-sdk/amazon-bedrock@5.0.43sentmessages[1]as an assistant message withcontent: []; activeus.amazon.nova-2-lite-v1:0returned the reported non-retryable HTTP 400. - Replaying the poisoned history after adding another user turn produced the same non-retryable 400, confirming that subsequent conversation turns remain blocked.
packages/amazon-bedrock/src/convert-to-amazon-bedrock-chat-messages.tsintentionally drops unsigned reasoning but unconditionally appends its assistant message; AWS requires message content, so this malformed request is created within the AI SDK provider.- The issue's Claude 3.5 Sonnet model reached EOL on July 30, 2026; the final outcome was reproduced with active Nova 2 Lite through the same Bedrock Converse API.
examples/ai-functions/src/reproduction/issue-18452-bedrock-empty-assistant.tsdemonstrates both failed replays; expected behavior is to omit the assistant message after its only part is filtered.packages/amazon-bedrock/src/__fixtures__/amazon-bedrock-empty-message-validation-error.jsonrecords the live provider response, andpackages/amazon-bedrock/src/amazon-bedrock-chat-language-model.test.tscontains the failing provider regression case.
Relevant Documentation
- https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Message.html
- https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/model-lifecycle.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-nova-2-lite.html
Related Issues
Reproduces #18452