[Bugfix][Frontend] Preserve token IDs in chat derender responses (#61065)

Signed-off-by: Ting Sun <suntcrick@gmail.com>
This commit is contained in:
Ting SUN
2026-10-12 07:55:06 +00:00
committed by GitHub
parent e3bbaf2369
commit f4114e068e
4 changed files with 22 additions and 3 deletions
@@ -95,6 +95,10 @@ async def stream_chat_derender(
)
assert resp.status_code == 200, resp.text
data = resp.json()
if chat_request.get("return_token_ids") and chat_request.get(
"include_reasoning", True
):
assert data["chunk"]["choices"][0]["token_ids"] == tids
state = data["stream_state"]
choices.extend(data["chunk"]["choices"])
if on_chunk is not None: