[Feature][Parser] Support include_reasoning param for non-Harmony models (#44301)

Signed-off-by: Alberto Perdomo <aperdomo@redhat.com>
Co-authored-by: Chauncey <chaunceyjiang@gmail.com>
This commit is contained in:
alberto
2026-07-10 15:34:02 +08:00
committed by GitHub
co-authored by Chauncey
parent e5588e49bc
commit 5715fde12c
13 changed files with 765 additions and 26 deletions
+10
View File
@@ -293,6 +293,16 @@ class HarmonyParser(DelegatingParser):
delta_message.reasoning = combined_reasoning
if tool_messages:
delta_message.tool_calls = tool_messages
# Suppress reasoning deltas if not requested
if delta_message and not request.include_reasoning:
delta_message.reasoning = None
# If only reasoning was in the message (no content, no tool_calls)
# skip emitting entirely
if not delta_message.content and not delta_message.tool_calls:
return None
return delta_message
def process_chunk(self, token_ids: Sequence[int]) -> ChunkResult: