[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
+5
View File
@@ -207,6 +207,11 @@ if _SDK_AVAILABLE:
if isinstance(result, ErrorResponse):
return _error_response(result, raw_request)
if (kwargs := result.reasoning_parser_kwargs) is not None:
kwargs.chat_template_kwargs = handler._engine_chat_template_kwargs(
kwargs.chat_template_kwargs
)
return JSONResponse(content=result.model_dump())
class CohereErrorEnvelopeMiddleware(BaseHTTPMiddleware):