-
-
Notifications
You must be signed in to change notification settings - Fork 11.8k
[GPT-OSS] Add support for arrays at tool message content #25593
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
Conversation
|
👋 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. 🚀 |
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.
Code Review
This pull request aims to add support for array content in tool messages. The current implementation is partial, only handling the first element of a text array, which can lead to data loss and potential runtime errors for other array types. I've suggested a more robust implementation to correctly process all text parts in an array and ensure the content is always a string, preventing crashes and preserving all information.
bfa6f7e to
f3ac776
Compare
|
This directionally seems reasonable and looks like it would fix the issue of vLLM rejecting valid tool responses when they're in a list of content vs direct string. The Chat Completions API spec does not technically restrict the array of For the failing ruff pre-commit hook, see https://docs.vllm.ai/en/latest/contributing/#linting for how to run these linting checks locally. |
83482f0 to
da5e8eb
Compare
Ensure harmony utils can also handle arrays for tool message content Signed-off-by: Luis Tomas Bolivar <[email protected]>
da5e8eb to
520ac14
Compare
|
The latest version of this looks good to me, with tests added for tool message content as a string, as a one-element list, and as a multi-element list. Thanks for helping find and fix these tool calling gaps! |
tisnik
left a comment
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.
it looks perfectly sane, thank you
NickLucche
left a comment
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.
lgtm
…t#25593) Signed-off-by: Luis Tomas Bolivar <[email protected]> Signed-off-by: xuebwang-amd <[email protected]>
…t#25593) Signed-off-by: Luis Tomas Bolivar <[email protected]> Signed-off-by: Dhruvil Bhatt <[email protected]>
…t#25593) Signed-off-by: Luis Tomas Bolivar <[email protected]> Signed-off-by: bbartels <[email protected]>
…t#25593) Signed-off-by: Luis Tomas Bolivar <[email protected]>
…t#25593) Signed-off-by: Luis Tomas Bolivar <[email protected]>
…t#25593) Signed-off-by: Luis Tomas Bolivar <[email protected]> Signed-off-by: xuebwang-amd <[email protected]>
…t#25593) Signed-off-by: Luis Tomas Bolivar <[email protected]> Signed-off-by: 0xrushi <[email protected]>
…t#25593) Signed-off-by: Luis Tomas Bolivar <[email protected]> Signed-off-by: 0xrushi <[email protected]>
…t#25593) Signed-off-by: Luis Tomas Bolivar <[email protected]>
…t#25593) Signed-off-by: Luis Tomas Bolivar <[email protected]>
Ensure harmony utils can also handle arrays for tool message content
This fixes the issue reported at #25001