From 72e415dfc81fb031dba32bc3c2ce0d890cb4eae5 Mon Sep 17 00:00:00 2001 From: silencejade <222910030+silencejade@users.noreply.github.com> Date: Sun, 26 Jul 2026 14:59:26 +0800 Subject: [PATCH] [Bugfix] Fix prefill suspension caused by delayed negotiate_should_allow_prefill invocation (#32389) --- python/sglang/srt/managers/schedule_policy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/managers/schedule_policy.py b/python/sglang/srt/managers/schedule_policy.py index 67a9243aa..21db31bc0 100644 --- a/python/sglang/srt/managers/schedule_policy.py +++ b/python/sglang/srt/managers/schedule_policy.py @@ -1000,7 +1000,11 @@ class PrefillAdder: if (self.prefill_delayer_single_pass is not None) and ( not self.prefill_delayer_single_pass.negotiate_should_allow_prefill( - local_prefillable=True + local_prefillable=True, + running_batch=self.running_batch.batch_size(), + max_prefill_bs=self.max_prefill_bs, + max_running_requests=self.max_running_requests, + waiting_queue_len=self.waiting_queue_len, ) ): return AddReqResult.OTHER