[Bugfix] Fix video prewarm cache retention and cancel-restart delay (#7363)

Signed-off-by: psv666 <2693925048@qq.com>
This commit is contained in:
psv666 authored and GitHub committed 2026-09-10 14:16:57 +00:00
1 parent e540dfb72f
commit c8bef008eb
3 files changed
+182 -18

No files matched your search

@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
"""Qwen-Omni streaming video WebSocket handler.
Accepts video frames incrementally via WebSocket, buffers them, and
@@ -26,12 +26,14 @@ Protocol:
from __future__ import annotations
from collections.abc import Mapping
from typing import Any
from vllm_omni.entrypoints.openai.video_stream_base import (
_BAD_FRAME,
_DEFAULT_CONFIG_TIMEOUT,
_DEFAULT_IDLE_TIMEOUT,
PrewarmedFrame,
StreamingVideoSessionConfig,
VideoStreamTurnTrigger,
)
@@ -59,7 +61,7 @@ class QwenOmniStreamingVideoHandler(OmniStreamingVideoHandlerBase):
audio_buffer: bytearray,
message_history: list[dict[str, Any]],
query_text: str,
prewarmed_frames: dict[str, tuple[Any, str]],
prewarmed_frames: Mapping[str, PrewarmedFrame],
) -> tuple[list[dict[str, Any]], dict[str, Any]]:
n_buf = len(frame_buffer)
if n_buf <= config.num_frames: