[Render] Add reasoning/tool parsing to /derender + fix byte-fallback FFFD (#45919)

Signed-off-by: aoshen524 <aoshen524@gmail.com>
Co-authored-by: Martin Hickey <martin.hickey@ie.ibm.com>
This commit is contained in:
aoshen02
2026-06-20 19:43:32 -04:00
committed by GitHub
co-authored by Martin Hickey
parent 6e919960af
commit f57ac274b2
4 changed files with 601 additions and 37 deletions
+8 -4
View File
@@ -219,10 +219,14 @@ class GenerateResponse(BaseModel):
class DerenderChatRequest(BaseModel):
"""Request for the /v1/chat/completions/derender endpoint.
"""Request for the /v1/chat/completions/derender endpoint (non-streaming).
Wraps a GenerateResponse and caller-supplied metadata needed to produce
a fully-formed ChatCompletionResponse without a GPU.
Wraps a complete GenerateResponse and caller-supplied metadata needed to
produce a fully-formed ChatCompletionResponse without a GPU.
Streaming derender would require a separate endpoint design with
incremental token delivery, ``OutputProcessor``-based detokenization,
and ``parser.parse_delta()`` instead of ``parser.parse()``.
"""
model: str
@@ -244,7 +248,7 @@ class DerenderChatRequest(BaseModel):
class DerenderCompletionRequest(BaseModel):
"""Request for the /v1/completions/derender endpoint.
"""Request for the /v1/completions/derender endpoint (non-streaming).
Parallel to DerenderChatRequest but handles the multi-prompt completions
case: one GenerateResponse per prompt, mirroring the list[GenerateRequest]