Conversation
ed9be83 to
4e6e1b3
Compare
An explicit null value for parallel_tool_calls was falsy, causing it to be filtered the same as False. Gate on `is not False` so that None resolves to the documented default (True), matching an omitted field. Fixes vllm-project#44948 Signed-off-by: ADHITHYA BALAKRISHNAN <adhithya.b2004@gmail.com>
4e6e1b3 to
b6657b0
Compare
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in PRs do not trigger a full CI run by default. 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. Agent GuidelinesIMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban. 🚀 |
|
Closing as duplicate of #44955 which addresses the same issue. |
Summary
Fixes #44948.
An explicit
parallel_tool_calls: nullwas falsy in Python, so it fell through the truthiness check and was filtered the same asfalse— trimming responses to a single tool call. Since the documented default istrue, andnullmeans "unspecified", it should resolve to that default just like an omitted field.Root cause:
if request.parallel_tool_calls:fires for bothFalseandNone.Fix: Change to
if request.parallel_tool_calls is not False:so thatNone(andTrue) both pass through, matching the docstring that says filtering only applies "when parallel_tool_calls is False".True)truefalsenullAlso adds a unit test covering all three explicit values (
True,False,None) for both non-streaming and streaming choices.