reproduction: Empty assistant message sent to provider after unsigned

Draft
AI
3mo ago
+218-0

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.52 and @ai-sdk/amazon-bedrock@5.0.43 sent messages[1] as an assistant message with content: []; active us.amazon.nova-2-lite-v1:0 returned 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.ts intentionally 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.ts demonstrates 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.json records the live provider response, and packages/amazon-bedrock/src/amazon-bedrock-chat-language-model.test.ts contains the failing provider regression case.

Relevant Documentation

Related Issues

Reproduces #18452