Description
Streaming tool calls through the native Bedrock provider hand the tool empty arguments ({}). Non-streaming works.
contentBlockDelta accumulates the tool input JSON fragments, but at contentBlockStop the accumulated string is never parsed back into the tool-call payload, so the call is emitted with empty arguments. Both the sync and async streaming handlers are affected. The non-streaming path already folds the arguments back, which is why only stream=True breaks.
Reproduced on current main (92eb5f91 merged into the branch under test):
# streaming, before fix
assert {} == {'city': 'Paris'}
# same input, non-streaming
{'city': 'Paris'}
Steps to Reproduce
- Configure an
LLM with a Bedrock model (bedrock/anthropic.claude-...) and stream=True.
- Give the agent a tool that takes an argument, e.g. a weather tool with
city.
- Ask a question that triggers the tool.
- The tool receives
{}; with stream=False it receives {'city': 'Paris'}.
Expected behavior
Streaming tool calls carry the same arguments as non-streaming ones.
Context
This re-files #6149, which the stale bot auto-closed on 2026-07-20 while PR #6150 (approved 2026-06-23) was still waiting to be merged. With the issue closed, the first-time-contributor check auto-closed the PR today, so the fix had no open issue to attach to. Filing this so the approved PR can be reopened against an open issue. Same root cause family as #4972 / #5415, but on the streaming path.
Existing PRs for this bug (three, all stalled)
| PR |
Author |
Opened |
State |
Notes |
| #5739 |
Ghraven |
2026-05-07 |
open, no-pr-activity |
earliest; same fold-back, no tests |
| #6151 |
devin-ai-integration |
2026-06-13 |
open, no-pr-activity |
same fold-back, size/L |
| #6150 |
kimnamu |
2026-06-13 |
approved 06-23, auto-closed today |
fold-back + 3 regression tests (sync/async); re-verified on main before this filing |
They all patch the same two handlers, so only one is needed. #5739 came first; #6150 is the one that carries regression tests and a maintainer approval. Happy to defer to whichever you prefer — if it's not mine, feel free to close #6150 for good.
Description
Streaming tool calls through the native Bedrock provider hand the tool empty arguments (
{}). Non-streaming works.contentBlockDeltaaccumulates the toolinputJSON fragments, but atcontentBlockStopthe accumulated string is never parsed back into the tool-call payload, so the call is emitted with empty arguments. Both the sync and async streaming handlers are affected. The non-streaming path already folds the arguments back, which is why onlystream=Truebreaks.Reproduced on current
main(92eb5f91merged into the branch under test):Steps to Reproduce
LLMwith a Bedrock model (bedrock/anthropic.claude-...) andstream=True.city.{}; withstream=Falseit receives{'city': 'Paris'}.Expected behavior
Streaming tool calls carry the same arguments as non-streaming ones.
Context
This re-files #6149, which the stale bot auto-closed on 2026-07-20 while PR #6150 (approved 2026-06-23) was still waiting to be merged. With the issue closed, the first-time-contributor check auto-closed the PR today, so the fix had no open issue to attach to. Filing this so the approved PR can be reopened against an open issue. Same root cause family as #4972 / #5415, but on the streaming path.
Existing PRs for this bug (three, all stalled)
no-pr-activityno-pr-activitymainbefore this filingThey all patch the same two handlers, so only one is needed. #5739 came first; #6150 is the one that carries regression tests and a maintainer approval. Happy to defer to whichever you prefer — if it's not mine, feel free to close #6150 for good.