A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 7, 00:15 UTC
[Refactor] Simplify `chat_completion_full_generator` for tool parsers (#35634)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Wentao Ye committed
Mar 9, 2026 at 11:33 UTC
941e52c29813ed75b3382f2a0d74ad5f168fc046
1 file changed
+1
-11
vllm/entrypoints/openai/chat_completion/serving.py
+1
-11
@@ -1463,17 +1463,7 @@ class OpenAIServingChat(OpenAIServing):
1463
tool_call_class = (
1464
MistralToolCall if is_mistral_tokenizer(tokenizer) else ToolCall
1465
)
1466
- if self.use_harmony:
1467
- # Harmony models already have parsed content and tool_calls
1468
- # through parse_chat_output. Respect its output directly.
1469
- message = ChatMessage(
1470
- role=role,
1471
- reasoning=reasoning,
1472
- content=content,
1473
- tool_calls=tool_calls if tool_calls else [],
1474
- )
1475
-
1476
- elif (not self.enable_auto_tools or not self.tool_parser) and (
1466
+ if (not self.enable_auto_tools or not self.tool_parser) and (
1467
not isinstance(request.tool_choice, ChatCompletionNamedToolChoiceParam)
1468
and request.tool_choice != "required"
1469
):