@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / bd6d5a7475
Fork 0

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 11, 01:15 UTC

[gpt-oss] Fix harmony parser in streaming responses (#30205)

Signed-off-by: AlonKejzman <alonkeizman@gmail.com>

AlonKejzman committed Dec 22, 2025 at 14:56 UTC bd6d5a7475aa26a85de5d63cfcae9a1151d7652f
1 file changed +5
vllm/entrypoints/openai/serving_chat.py
+5
@@ -811,6 +811,11 @@ class OpenAIServingChat(OpenAIServing):
811 delta_text += harmony_parser.last_content_delta or ""
812 cur_channel = harmony_parser.current_channel
813 cur_recipient = harmony_parser.current_recipient
814 + # handle the case where several tokens where generated at once
815 + # including the final token, leading to a delta in the text
816 + # but the current channel to be empty (start state)
817 + if not cur_channel and delta_text:
818 + cur_channel = "final"
819 else:
820 delta_text = output.text
821