Repository navigation
[Bugfix] Fix unstreamed tool call args dropped in Responses API streaming - #44348
Merged
Merged
Conversation
Signed-off-by: sfeng33 <4florafeng@gmail.com>
sfeng33
marked this pull request as ready for review
June 2, 2026 18:46
sfeng33
requested review from
DarkLight1337,
aarnphm,
bbrowning,
chaunceyjiang and
russellb
as code owners
June 2, 2026 18:46
bbrowning
approved these changes
Jun 2, 2026
bbrowning
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. At first I was slightly concerned about the signature change for how the finished parameter is defined in the abstract parser. But, then I realized we only added that very recently so the odds of this breaking any 3rd party code in the wild is extremely low.
sfeng33
enabled auto-merge (squash)
June 3, 2026 04:08
nkzhenhua
pushed a commit
to nkzhenhua/vllm
that referenced
this pull request
Jun 24, 2026
…ming (vllm-project#44348) Signed-off-by: sfeng33 <4florafeng@gmail.com>
philippesic
pushed a commit
to philippesic/vllm-semantic-cache
that referenced
this pull request
Jul 19, 2026
…ming (vllm-project#44348) Signed-off-by: sfeng33 <4florafeng@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
When tool parsers stream arguments incrementally, they may buffer chunks that haven't been sent to the client yet. On the final streaming delta, parse_delta(finished=True) calls _append_unstreamed_tool_args(), which computes the diff between the fully-parsed arguments and what was actually streamed, and appends the remainder. Without this flush, the client receives truncated or empty tool call arguments.
The chat completions path already passes finished correctly. This PR extends the same fix to the Responses API path.
Test Plan
Verify the final streamed event contains complete tool call arguments (e.g. {"location": "San Francisco"}) rather than truncated.