From bbf80ede4325ae8bed35dfb1c04be63e6b0ce372 Mon Sep 17 00:00:00 2001 From: Adolfo Victoria Date: Fri, 9 Jan 2026 06:03:32 -0800 Subject: [PATCH] Fix type error (#31999) Signed-off-by: Adolfo Victoria Co-authored-by: Adolfo Victoria --- vllm/entrypoints/responses_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vllm/entrypoints/responses_utils.py b/vllm/entrypoints/responses_utils.py index df3d04957..5fd0cf43e 100644 --- a/vllm/entrypoints/responses_utils.py +++ b/vllm/entrypoints/responses_utils.py @@ -78,7 +78,9 @@ def _maybe_combine_reasoning_and_tool_call( This function checks if the last message is a reasoning message and the current message is a tool call""" if not ( - isinstance(item, ResponseFunctionToolCall) and item.id.startswith(MCP_PREFIX) + isinstance(item, ResponseFunctionToolCall) + and item.id + and item.id.startswith(MCP_PREFIX) ): return None if len(messages) == 0: