[Bugfix] Keep resumable duplex prompts out of async-chunk prewarm (#7992)

Signed-off-by: Tianyao Wu <rayroy31@gmail.com>
This commit is contained in:
Tianyao Wu authored and GitHub committed 2026-09-22 15:36:42 +08:00
1 parent f3f8ebfc25
commit ba5b7485a7
2 files changed
+23 -3

No files matched your search

+5 -3
View File
@@ -357,9 +357,6 @@ class DuplexOrchestrator(Orchestrator, DuplexStagePort):
if not isinstance(request_state, DuplexOrchestratorRequestState):
raise RuntimeError(f"duplex request was not preregistered: {context.request_id}")
request_state.streaming.enabled = submission.resumable
# Keep raw Stage0 prompt (additional_information / multi_modal_data) for
# stage input processors via process_engine_inputs.
request_state.prompt = dict(submission.prompt)
if submission.resumable:
request = build_engine_core_request_from_tokens(
request_id=context.request_id,
@@ -369,6 +366,11 @@ class DuplexOrchestrator(Orchestrator, DuplexStagePort):
resumable=True,
)
else:
# Keep raw Stage0 prompt (additional_information / multi_modal_data) for
# stage input processors via process_engine_inputs. Resumable requests
# leave it unset: their prompt is one append with Stage0's duplex
# buffer, which the async-chunk prewarm would copy downstream.
request_state.prompt = dict(submission.prompt)
# Use the ordinary multimodal input processor for turn-model plugins.
# Its CPU preprocessing runs off the session/orchestrator event loop.
request = await asyncio.to_thread(