[FEAT][Fronted] Support incremental prefill for realtime video streaming (#5894)

Signed-off-by: ZhengWG <zwg0606@gmail.com>
Signed-off-by: Zheng Wengang <zwg0606@gmail.com>
Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
This commit is contained in:
Zheng Wengangandamy-why-3459 authored and GitHub committed 2026-10-02 22:18:51 +08:00
1 parent e372aa3a41
commit eb1699bfca
6 files changed
+1187 -234

No files matched your search

+4
View File
@@ -128,6 +128,7 @@ class AsyncOmni(AsyncOmniBase, EngineClient):
reasoning_ended: bool | None = None,
reasoning_parser_kwargs: dict[str, Any] | None = None,
arrival_time: float | None = None,
submitted: asyncio.Future[None] | None = None,
) -> AsyncGenerator[OmniRequestOutput, None]:
"""Generate outputs for the given prompt(s) asynchronously.
@@ -296,6 +297,9 @@ class AsyncOmni(AsyncOmniBase, EngineClient):
if admitting:
await self._release_generate_admission()
admitting = False
# Callers wait on this before abort so Stage0 observes the sender cache.
if submitted is not None and not submitted.done():
submitted.set_result(None)
# Refresh gauges on arrival.
self._publish_request_gauges(len(self.request_states))