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: