Files
crewAI/lib/crewai/tests
Devin AI b125e572c4 fix(bedrock): group consecutive tool results into single user message
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>
2026-03-06 15:47:36 +00:00
..
2026-03-04 00:45:09 -05:00
2025-10-20 14:10:19 -07:00
2025-12-04 16:53:19 -05:00
2026-02-13 21:34:37 -03:00
2025-10-20 14:10:19 -07:00
2026-02-13 21:34:37 -03:00
2025-12-04 13:34:29 -08:00
2025-10-20 14:10:19 -07:00
2026-02-13 21:34:37 -03:00
2025-12-01 18:56:56 -05:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00
2025-10-20 14:10:19 -07:00