From 25ee659db01f42747e87e784c139c0686f2cada6 Mon Sep 17 00:00:00 2001 From: Zang Peiyu <166481866+factnn@users.noreply.github.com> Date: Tue, 16 Jun 2026 05:14:10 +0800 Subject: [PATCH] Fix parallel_tool_calls: null treated as false instead of default true (#44955) Signed-off-by: factnn <166481866+factnn@users.noreply.github.com> --- vllm/entrypoints/serve/utils/tool_calls_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vllm/entrypoints/serve/utils/tool_calls_utils.py b/vllm/entrypoints/serve/utils/tool_calls_utils.py index 648698c2a97..42106f43340 100644 --- a/vllm/entrypoints/serve/utils/tool_calls_utils.py +++ b/vllm/entrypoints/serve/utils/tool_calls_utils.py @@ -19,9 +19,9 @@ _ChatCompletionResponseChoiceT = TypeVar( def maybe_filter_parallel_tool_calls( choice: _ChatCompletionResponseChoiceT, request: ChatCompletionRequest ) -> _ChatCompletionResponseChoiceT: - """Filter to first tool call only when parallel_tool_calls is False.""" + """Filter to first tool call only when parallel_tool_calls is explicitly False.""" - if request.parallel_tool_calls: + if request.parallel_tool_calls is not False: return choice if isinstance(choice, ChatCompletionResponseChoice) and choice.message.tool_calls: