mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
d6d2e2c96a
Add _fix_messages_for_bedrock() to handle three issues caused by after_agent restoring frontend tool_calls to the checkpoint: 1. Strip unanswered tool_calls without matching ToolMessages (Bedrock rejects toolUse without a corresponding toolResult) 2. Sync msg.content tool_use blocks with msg.tool_calls 3. Fix tool_use/tool_call blocks with string input/args (must be dict)