You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python: Bug in multi-tool parameter parsing when using BedrockChatCompletion with the Converse Stream API #12202
Describe the bug
When an agent runs with BedrockChatCompletion using the Converse Stream API, tool parameters are not correctly parsed when more than 1 tool is used. For instance, if tool_a and tool_b are going to be executed with parameters {"param_11": "value_11"} and {"param_21": "value_21"} respectively, the parsing of content blocks in BedrockChatCompletion produces {"param_11": "value_11"}{"param_21": "value_21"} and {"param_21": "value_21"}, which is wrong (in addition to be invalid JSON for the first).
To Reproduce
Define a plugin with at least 2 tools (with at least 1 parameter each) and an agent with BedrockChatCompletion using the Converse Stream API. Then, ask the agent to run the 2 tools.
Expected behavior
Tool calls and their parameters should be correctly parsed.
Activity
ja-bot commentedon May 20, 2025
I have a small change that fixes this problem. I'll open a PR for that.
ja-bot commentedon May 20, 2025
This PR fixes the problem: #12203
Python: Add missing index in Bedrock FunctionCallContent instantiation (
Python: Add missing index in Bedrock FunctionCallContent instantiation (
Python: Add missing index in Bedrock FunctionCallContent instantiation (