V2 follow-up to #45621. This changes the native Bedrock Converse adapter, not V1 or the Vercel SDK dependency.
Type of change
Bug fix
New feature
Refactor / code improvement
Documentation
What does this PR do?
Unsigned reasoning can reach the Bedrock adapter after a model switch or from incomplete history without a recorded error. The adapter currently sends it as reasoningContent without a usable signature.
Demote readable unsigned reasoning to ordinary text, preserving its cache hint, as the Anthropic adapter already does. Drop blank unsigned reasoning and omit assistant messages left empty. Signed and redacted reasoning remain unchanged, without cache points appended to those blocks.
How did you verify your code works?
Eight new request-compilation regressions failed before the fix and pass afterward: missing/empty/whitespace signatures with automatic caching on/off, empty reasoning with cache hints, and mixed foreign/signed/redacted reasoning plus text and tools.
Core history conversion and interrupted-reasoning continuation checks: 24 passed.
AI package typecheck, formatting, and git diff --check passed.
Full AI suite: 789 passed, 25 skipped, 17 failed. Untouched base 5d4ce14dc4 has the identical 17 failing test names (781 passed, 25 skipped); those existing failures are not changed here.
No live Bedrock request was made; validation uses local wire-shape assertions and existing fixtures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
V2 follow-up to #45621. This changes the native Bedrock Converse adapter, not V1 or the Vercel SDK dependency.
Type of change
What does this PR do?
Unsigned reasoning can reach the Bedrock adapter after a model switch or from incomplete history without a recorded error. The adapter currently sends it as reasoningContent without a usable signature.
Demote readable unsigned reasoning to ordinary text, preserving its cache hint, as the Anthropic adapter already does. Drop blank unsigned reasoning and omit assistant messages left empty. Signed and redacted reasoning remain unchanged, without cache points appended to those blocks.
How did you verify your code works?
Screenshots / recordings
Not a UI change.
Checklist
Requested by: @neriousy (Filip via Slack)