From 50708f95aec011d81aeae3258d6532972d2b5ad3 Mon Sep 17 00:00:00 2001 From: Ting SUN Date: Thu, 27 Aug 2026 18:19:07 +0800 Subject: [PATCH] [Bugfix][OpenAI] Fix streamed completion logprob offsets with echo (#47815) Signed-off-by: Ting Sun --- vllm/entrypoints/openai/completion/serving.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/entrypoints/openai/completion/serving.py b/vllm/entrypoints/openai/completion/serving.py index 93a2b7d3aa..29a8e44933 100644 --- a/vllm/entrypoints/openai/completion/serving.py +++ b/vllm/entrypoints/openai/completion/serving.py @@ -395,7 +395,7 @@ class OpenAIServingCompletion(GenerateBaseServing): else: logprobs = None - previous_text_lens[i] += len(output.text) + previous_text_lens[i] += len(delta_text) previous_num_tokens[i] += len(output.token_ids) finish_reason = output.finish_reason stop_reason = output.stop_reason