Skip to content

Conversation

@heheda12345
Copy link
Collaborator

@heheda12345 heheda12345 commented Aug 8, 2025

Essential Elements of an Effective PR Description Checklist

  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Purpose

Fix several bugs for gpt-oss response API

Test Plan

triton: 3.4.0+git663e04e8 torch: 2.9.0.dev20250723+cu128, h100

  1. EXA_API_KEY=**** VLLM_ENABLE_RESPONSES_API_STORE=1 pytest -vs test_response_api_with_harmony.py
  2. change the above test from "--tool-server", "demo" to "--tool-server", "localhost:port1,localhost:port2" (where port1 and port2 are MCP clients for builtin tools)

Test Result

  1. pass all tests
  2. test_streaming fails as expected (because streaming + MCP + tool call is not supported yet)

(Optional) Documentation Update

NOTES

Should be merged after #22431 and #22421
needs triton: 3.4.0+git663e04e8 and torch: 2.9.0.dev20250723+cu128

@github-actions
Copy link

github-actions bot commented Aug 8, 2025

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@mergify
Copy link

mergify bot commented Aug 8, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @heheda12345.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Aug 8, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several bug fixes for the gpt-oss response API and adds support for Triton kernels for MoE layers with mxfp4 quantization. The changes are extensive, touching API serving logic, context management, and model execution layers. My review focuses on the correctness and robustness of these changes. I've identified a critical issue in the streaming response generation logic where item and content indices are not being updated, and a high-severity issue in tool call argument parsing that could lead to unhandled exceptions.

Comment on lines 775 to 812
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The variables current_content_index and current_item_id are initialized to static values and are never updated within the responses_stream_generator loop, as indicated by the FIXME comments. This is a critical issue as it will result in all streamed output items having an empty or incorrect ID and a content index of 0, which violates the API contract and will likely cause issues for clients. These variables should be updated with appropriate values for each new output item, likely when ctx.is_expecting_start() is true.

Comment on lines 195 to 197
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The direct access browser_call["pattern"] will raise a KeyError if the pattern key is missing from the browser_call dictionary, which can occur if the model output is malformed. This would cause an unhandled exception and crash the request. It's safer to use the .get() method and handle the case where the key is missing, similar to how query and url are handled in the surrounding code.

            pattern = browser_call.get("pattern")
            if pattern is None:
                raise ValueError("Missing 'pattern' in browser.find call")
            action = ActionFind(pattern=pattern,
                                url=f"cursor:{browser_call.get('url', '')}",
                                type="find")

@mergify mergify bot added the gpt-oss Related to GPT-OSS models label Aug 11, 2025
Signed-off-by: Chen Zhang <[email protected]>
Signed-off-by: Chen Zhang <[email protected]>
Signed-off-by: Chen Zhang <[email protected]>
@heheda12345 heheda12345 added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 12, 2025
@simon-mo simon-mo merged commit ad344ef into vllm-project:main Aug 12, 2025
9 of 15 checks passed
paulpak58 pushed a commit to paulpak58/vllm that referenced this pull request Aug 13, 2025
diegocastanibm pushed a commit to diegocastanibm/vllm that referenced this pull request Aug 15, 2025
yiliu30 pushed a commit to yiliu30/vllm-fork that referenced this pull request Aug 19, 2025
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend gpt-oss Related to GPT-OSS models ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants