Conversation
Signed-off-by: sa411022 <sa411022@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request addresses a bug where a tool call from gpt-oss is validated as a dictionary instead of a ResponseFunctionToolCall object. The fix involves adding an elif block to check if the message is a dictionary representing a function call and, if so, converting it into the proper ResponseFunctionToolCall object. This change is crucial for the subsequent logic that needs to find this specific object type to correctly process tool call outputs. The implementation is direct, correct, and safely resolves the issue described in the pull request description.
|
👋 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 You ask your reviewers to trigger select CI tests on top of 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 If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
heheda12345
left a comment
There was a problem hiding this comment.
Can you add a test in https://github.com/vllm-project/vllm/blob/main/tests/entrypoints/openai/test_response_api_with_harmony.py and test it locally?
Signed-off-by: sa411022 <sa411022@gmail.com>
|
I found the root cause is that some clients (such as LangChain) do not include the However, I am not sure if this should be fixed on the server side (vLLM) or the client side (such as LangChain)? |
|
Would be great if you can parse it correctly in vLLM. My suspicion is |
|
FYI #24158 has a fix. |
|
This pull request has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this pull request should remain open. Thank you! |
|
Hi @sa411022, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, |
|
Thanks for investigating this bug! As noted by @heheda12345 in the review, #24158 contains the proper fix for this issue. Closing as superseded. |
Purpose
Fix gpt-oss tool call when Pydantic validates the function call message as
dictTest Plan
Test Result
(Optional) Documentation Update