fix(react-langgraph): preserve streamed bedrock tool args#5080
fix(react-langgraph): preserve streamed bedrock tool args#5080Kinfe123 wants to merge 4 commits intomainassistant-ui/assistant-ui:mainfrom fix/langgraph-bedrock-tool-argsassistant-ui/assistant-ui:fix/langgraph-bedrock-tool-argsCopy head branch name to clipboard
Conversation
🦋 Changeset detectedLatest commit: a3e8ff8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Claude finished @Kinfe123's task in 2m 17s —— View job Review — PR #5080 (through a3e8ff8)Changes since last reviewOne commit, a3e8ff8, which applies the previously suggested refactor verbatim: Previously identified issues — all resolved
CorrectnessThe fix targets the right root cause. The tracker enforces a prefix-monotonic contract on I also confirmed the fix only affects the path that was actually broken. The messages-tuple accumulator ( One benign behavioral edge worth knowing about (not blocking)A completed zero-argument tool call that still retains an argless chunk now converts to
No action needed; noting it so it doesn't surprise anyone later. Tests & repo requirements
Good practices
SimplifyThe simplify agent surfaced one candidate: the Verdict: LGTM. The fix is minimal, root-caused, tested from both directions, and all prior review threads are resolved. |
|
Reviews (1): Last reviewed commit: "fix(react-langgraph): preserve streamed ..." | Re-trigger Greptile |
Summary
tool_call_chunkas an empty streaming prefixWhy
Bedrock can start a tool call with a chunk that has an ID and name but no argument text. The converter previously turned the parsed empty object into
"{}". Later argument prefixes such as{"url":are not extensions of"{}", so the invocation tracker rejected them and the frontend tool executed with empty arguments.Testing
main: the regression test receivedargsText: "{}"instead of""@assistant-ui/react-langgraph: 182 tests passed@assistant-ui/react-langgraphbuild passedCloses #5074