fix(ai): round-trip Bedrock redacted reasoning (#8314)
Bedrock Converse returns encrypted reasoning from non-Anthropic models (e.g. OpenAI GPT-5.6) as the opaque `reasoningContent.redactedContent` member. The stream handler only read `text` and `signature`, so the payload was dropped and replayed history lost the reasoning block. Buffer the delta bytes, encode them into `thinkingSignature` with `redacted: true` (the representation the Anthropic path already uses), and lower them back to `reasoningContent.redactedContent` on the next turn. Scratch state is stripped from every terminal path, since a stream can settle without stopping each block.
S
Seiji Toyama committed
d57e531f5dc57974e2f9ce7a618730e5358a45db
Parent: 830a0a5
Committed by GitHub <noreply@github.com>
on 8/19/2026, 10:42:27 AM