From 358ae3563dfae372191b2b3c3704f38e1ba086b6 Mon Sep 17 00:00:00 2001 From: Shangming Cai Date: Sat, 1 Nov 2025 08:57:10 +0800 Subject: [PATCH] Tiny fix eos handling for PD disaggregation (#12334) Signed-off-by: Shangming Cai --- python/sglang/srt/disaggregation/decode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/disaggregation/decode.py b/python/sglang/srt/disaggregation/decode.py index 15fd10467..fd98604e8 100644 --- a/python/sglang/srt/disaggregation/decode.py +++ b/python/sglang/srt/disaggregation/decode.py @@ -776,7 +776,7 @@ class DecodeTransferQueue: # special handling for corner cases should_finish = ( decode_req.req.sampling_params.max_new_tokens == 1 - or output_id in decode_req.req.eos_token_ids + or decode_req.req.output_ids[-1] in decode_req.req.eos_token_ids ) if should_finish: # finish immediately