[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 <gaohan19@huawei.com>
This commit is contained in:
Junhong LiuandGao Han authored and GitHub committed 2026-02-26 10:59:18 +08:00
1 parent 315daeba8c
commit 919ad28da5
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -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
@@ -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: