[Bugfix][ResponsesAPI] Fix crash when tool_choice=required exceeds max_output_tokens#37258
Merged
DarkLight1337 merged 3 commits intovllm-project:mainfrom Mar 17, 2026
Merged
Conversation
…x_output_tokens Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request addresses a crash in the Responses API when tool_choice="required" and the generated output for the tool call exceeds max_output_tokens. The fix correctly handles potential ValidationError during JSON parsing of the model's output by suppressing the exception. This prevents the crash and ensures that if the tool call JSON is invalid or truncated, no tool call is returned, which is the desired behavior. A new test case is added to validate this fix, confirming that the system remains stable under these conditions.
…x_output_tokens Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…x_output_tokens Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Collaborator
Author
|
/cc @DarkLight1337 PTAL. |
5 tasks
DarkLight1337
approved these changes
Mar 17, 2026
zhenwei-intel
pushed a commit
to zhenwei-intel/vllm
that referenced
this pull request
Mar 17, 2026
…x_output_tokens (vllm-project#37258) Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Closed
7 tasks
Lucaskabela
pushed a commit
to Lucaskabela/vllm
that referenced
this pull request
Mar 17, 2026
…x_output_tokens (vllm-project#37258) Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
andylolu2
pushed a commit
to andylolu2/vllm
that referenced
this pull request
Mar 18, 2026
…x_output_tokens (vllm-project#37258) Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
wendyliu235
pushed a commit
to wendyliu235/vllm-public
that referenced
this pull request
Mar 18, 2026
…x_output_tokens (vllm-project#37258) Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
12 tasks
fxdawnn
pushed a commit
to fxdawnn/vllm
that referenced
this pull request
Mar 19, 2026
…x_output_tokens (vllm-project#37258) Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
khairulkabir1661
pushed a commit
to khairulkabir1661/vllm
that referenced
this pull request
Mar 27, 2026
…x_output_tokens (vllm-project#37258) Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Monishver11
pushed a commit
to Monishver11/vllm
that referenced
this pull request
Mar 27, 2026
…x_output_tokens (vllm-project#37258) Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com> Signed-off-by: Monishver Chandrasekaran <monishverchandrasekaran@gmail.com>
JiantaoXu
pushed a commit
to JiantaoXu/vllm
that referenced
this pull request
Mar 28, 2026
…x_output_tokens (vllm-project#37258) Signed-off-by: chaunceyjiang <chaunceyjiang@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
follow up #36841
FIX https://buildkite.com/vllm/ci/builds/56537?group_by=test#019cf9dc-06da-4341-aa86-6e0d6cb06ec8
Test Plan
see e2e
Test gpt-5 with openai
Test Result
gpt-5
vllm
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.