From 919ad28da5232497c3526683fa910ec7a9c6b583 Mon Sep 17 00:00:00 2001 From: Junhong Liu Date: Thu, 26 Feb 2026 10:59:18 +0800 Subject: [PATCH] [BugFix] process request.num_cached_tokens if it equals to the initial value (#1468) Signed-off-by: Junhong Liu <98734602+LJH-LBJ@users.noreply.github.com> Co-authored-by: Gao Han --- .buildkite/test-ready.yml | 2 +- vllm_omni/core/sched/omni_generation_scheduler.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.buildkite/test-ready.yml b/.buildkite/test-ready.yml index e0cb91b08..d7595e26c 100644 --- a/.buildkite/test-ready.yml +++ b/.buildkite/test-ready.yml @@ -157,7 +157,7 @@ steps: # type: DirectoryOrCreate - label: "Omni Model Test" - timeout_in_minutes: 15 + timeout_in_minutes: 17 depends_on: upload-ready-pipeline commands: - export VLLM_LOGGING_LEVEL=DEBUG diff --git a/vllm_omni/core/sched/omni_generation_scheduler.py b/vllm_omni/core/sched/omni_generation_scheduler.py index ef1c4c7c9..1e7b6a215 100644 --- a/vllm_omni/core/sched/omni_generation_scheduler.py +++ b/vllm_omni/core/sched/omni_generation_scheduler.py @@ -125,6 +125,9 @@ class OmniGenerationScheduler(VLLMScheduler): # Pop the finished request from waiting queue and don't schedule it self.waiting.pop_request() continue + # Count the number of prefix cached tokens. + if request.num_cached_tokens < 0: + request.num_cached_tokens = request.num_computed_tokens # async_chunk: wait for the first upstream chunk (don't start with placeholders). if self.chunk_transfer_adapter is not None and len(request.prompt_token_ids) == 0: