[BugFix][Frontend] Pass reasoning_ended through render → generate (#60059) (#60062)

Signed-off-by: Yida Weng <84164537+YidaWeng@users.noreply.github.com>
Signed-off-by: Flora Feng <4florafeng@gmail.com>
Co-authored-by: Flora Feng <4florafeng@gmail.com>
This commit is contained in:
Yida Weng
2026-10-05 20:39:25 +00:00
committed by GitHub
co-authored by Flora Feng
parent 74c5cbcd7b
commit 18c8a65edd
11 changed files with 249 additions and 22 deletions
@@ -364,17 +364,9 @@ class OpenAIServingChat(GenerateBaseServing):
session_id=session_id,
)
else:
if not request.include_reasoning:
reasoning_ended = True
elif request._grammar_from_parser:
# The Mistral grammar already includes an optional
# `think?` rule that handles both reasoning and
# non-reasoning outputs.
reasoning_ended = True
elif parser is not None and parser.reasoning_parser is not None:
reasoning_ended = parser.is_reasoning_end(prompt_token_ids or [])
else:
reasoning_ended = None
reasoning_ended = request.resolve_reasoning_ended(
parser, prompt_token_ids or []
)
generator = self.engine_client.generate(
engine_input,