From 4b94ed8f928533b1f7c3a0293790ccb592b49f1a Mon Sep 17 00:00:00 2001 From: Andrew Xia Date: Mon, 10 Nov 2025 14:07:49 -0800 Subject: [PATCH] [Frontend][2/n] remove empty content from _parse_tool_calls_from_content (#28331) Signed-off-by: Andrew Xia Co-authored-by: Andrew Xia --- vllm/entrypoints/openai/serving_engine.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vllm/entrypoints/openai/serving_engine.py b/vllm/entrypoints/openai/serving_engine.py index 8ce4ff574699d..30b8499b08d5b 100644 --- a/vllm/entrypoints/openai/serving_engine.py +++ b/vllm/entrypoints/openai/serving_engine.py @@ -1375,6 +1375,8 @@ class OpenAIServing: for tool_call in tool_call_info.tool_calls ) content = tool_call_info.content + if content and content.strip() == "": + content = None else: # No tool calls. return None, content