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
Commit 7def61f
Browse filesBrowse the repository at this point in the historyBrowse files
fix: avoid duplicating arguments in streamed declaration-only tool calls (#6973)
When streaming a declaration-only function call, the _stream() loop yields
function_call chunks from the inner stream (line ~2800), then later re-yields
the same function_call items from function_call_results (line ~2847).
The _process_update callback concatenates streaming arguments via +=, so
duplicate yields cause the arguments to be concatenated twice:
{"location":"Seattle"}{"location":"Seattle"}
Filter out function_call type items from the streamed update, since they
were already emitted by the inner stream. Only yield function_result and
approval items, which are newly generated by _process_function_requests.
Tests: both split-chunk and single-chunk streaming of declaration-only tools.
Fixes #6973
0 commit comments