-
Notifications
You must be signed in to change notification settings - Fork 14
test: stateful multi-turn tool-call cassettes with context retention #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
franciscojavierarceo
merged 5 commits into
vllm-project:main
from
ashwing:test/multi-turn-tool-cassettes
Jun 25, 2026
+15,202
−22
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d1b0bec
test: add stateful multi-turn tool-call cassettes with previous_respo…
ashwing 4ed6bb8
test: add OpenAI cassettes, parallel calls, and tool-output-only patt…
ashwing cb86e14
docs: update record.sh with all 12 cassette recording commands
ashwing 7f4d2cb
test: re-record all 12 cassettes from record.sh for determinism
ashwing 8ca36bb
refactor: remove assert_stateful_chaining from accumulator tests
ashwing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
important note for gpt-oss serving if you used vLLM upstream serving you might make sure that you have passed correct tool parser. maybe the tool parser that you served the model on vLLM was not able to catch current status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed — this isn't a tool parser config issue, it's how vLLM's Responses API serializes completed function calls (status field is always null in the output). The fix is a
deserialize_withhandler that defaults null toCompleted. All 4 cassettes have"status": nullin responses and the tests verify they deserialize toMessageStatus::Completed.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashwing this behavior only when running
gpt-osson vLLM right? if so can you check runninggpt-osson OpenAI and see the behavior is the same there just to confirm that this is not a bug from vLLM upstream.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed — vLLM-specific. The OpenAI cassettes in this PR (recorded against gpt-4o) show
"status": "completed"on function_call items. vLLM returns"status": null. The deserializer handles both: null defaults to Completed, string "completed" maps directly.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashwing I mean if such behavior is only on a harmony model being served on vLLM it might be bug on vLLM upstream we need to note about to open issue. otherwise we should not fix bug from upstream by mapping into a default. ordinarily the behaviors of responses on vLLM should match OpenAI Responses API. would need to confirm if "status": null also occurs for serving other non harmony models on vLLM.
for now it should be fine to handle this way but later if there is a bug from vLLM we need to address that. would need to confirm this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashwing I think the tool parser you selected is wrong. https://docs.vllm.ai/projects/recipes/en/latest/OpenAI/GPT-OSS.html#tool-use based on this vllm's recipe it has to be openai
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested both
--tool-call-parser openai(per the vLLM recipe) andhermes— same result with both. The earlier table only showedhermesbut I had already validated both.Did root-cause investigation. Confirmed bug in vLLM's Harmony codepath on current
main— no existing issue or PR for it.Test matrix
All tests use
/v1/responses,store=true, non-streaming:--tool-call-parserfunction_call.status"completed""completed"nullnull"completed""completed"Parser doesn't matter — gpt-oss returns
nullwith bothopenaiandhermes. Non-Harmony models (Gemma4, Hermes-3) return"completed"correctly.Root cause in vLLM source
Non-Harmony path (
responses_parser.py:101) — correctly sets status:Harmony path (
harmony.py:315) — omits status:Since
ResponseFunctionToolCall.statusisOptional[...] = Nonein the OpenAI SDK, it silently serializes asnull. One-line fix: addstatus="completed"to_parse_function_call.Current state
main— verified on HEAD (f59db63, June 23)._parse_function_callis unchanged.Our deserializer handles both
nulland"completed"correctly in the meantime.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashwing thanks for double checking. I do understand the default deserialization is handling the case but is not an actual fix. we need to make sure vLLM Responses API is mirroring OpenAI if not in cases like this means there is a bug on vLLM. worth taking note instead of us silently resolving issues on
agentic-apithis way. BTW the harmony models like gpt-oss are not really part of MVP either.It's good to have them in cassettes to know where we stand but we should rely on other models to serve on vLLM foragentic-apiverification.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashwing please file an issue to vLLM upstream.
CC @bbrowning @chaunceyjiang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed upstream: vllm-project/vllm#46940