From 67ed01c353f522f3265b95f8a01295f1d99d2969 Mon Sep 17 00:00:00 2001 From: Yuan Tang Date: Mon, 20 Apr 2026 00:17:30 -0400 Subject: [PATCH] fix: Do not make function calls when request has no tools for /v1/responses (#40314) Signed-off-by: Yuan Tang --- vllm/entrypoints/openai/responses/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/entrypoints/openai/responses/utils.py b/vllm/entrypoints/openai/responses/utils.py index 66239289f7..ad94c8d8de 100644 --- a/vllm/entrypoints/openai/responses/utils.py +++ b/vllm/entrypoints/openai/responses/utils.py @@ -264,7 +264,7 @@ def convert_tool_responses_to_completions_format(tool: dict) -> dict: def construct_tool_dicts( tools: list[Tool], tool_choice: ToolChoice ) -> list[dict[str, Any]] | None: - if tools is None or (tool_choice == "none"): + if not tools or (tool_choice == "none"): tool_dicts = None else: tool_dicts = [