mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-11 05:22:41 +00:00
When a Bedrock model makes multiple parallel tool calls, the Converse API requires all toolResult blocks to be sent in a single user message. Previously each tool result created a separate user message, causing a ValidationException. This fix detects consecutive tool result messages and appends them to the same user message, producing the expected structure: Message 0: user (prompt) Message 1: assistant (toolUse A, toolUse B) Message 2: user (toolResult A, toolResult B) ← grouped Fixes #4749 Co-Authored-By: João <joao@crewai.com>