mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-07 19:48:13 +00:00
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* fix(bedrock): group parallel tool results in single user message When an AWS Bedrock model makes multiple tool calls in a single response, the Converse API requires all corresponding tool results to be sent back in a single user message. Previously, each tool result was emitted as a separate user message, causing: ValidationException: Expected toolResult blocks at messages.2.content Fix: When processing consecutive tool messages, append the toolResult block to the preceding user message (if it already contains toolResult blocks) instead of creating a new message. This groups all parallel tool results together while keeping tool results from different assistant turns separate. Fixes #4749 Signed-off-by: Giulio Leone <6887247+giulio-leone@users.noreply.github.com> * Update lib/crewai/tests/llms/bedrock/test_bedrock.py * fix: group bedrock tool results Co-authored-by: João Moura <joaomdmoura@gmail.com> --------- Signed-off-by: Giulio Leone <6887247+giulio-leone@users.noreply.github.com> Co-authored-by: Giulio Leone <6887247+giulio-leone@users.noreply.github.com> Co-authored-by: João Moura <joaomdmoura@gmail.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com>