[EC Connector] Add has_pending_push_work (#49582)

Signed-off-by: omerpaz95 <omerpaz95@gmail.com>

omerpaz95 committed Jul 29, 2026 at 12:04 UTC dad7a6383b7d86709cea420d9594f48b9b42cf69
2 files changed +16
vllm/distributed/ec_transfer/ec_connector/base.py
+12
@@ -275,3 +275,15 @@ class ECConnectorBase(ABC):
275 get_finished().
276 """
277 return False, None
278 +
279 + def has_pending_push_work(self) -> bool:
280 + """Return True if the connector has push-mode work that requires
281 + the engine main loop to keep stepping (e.g. for EPD,
282 + Producer has push work when Xfer is in progress - Consumer
283 + is reading it).
284 + This mirrors exactly the KV Connector's has_pending_push_work().
285 +
286 + Connectors that don't implement push-based EC transfer should
287 + leave this as False.
288 + """
289 + return False
vllm/v1/core/sched/scheduler.py
+4
@@ -2362,6 +2362,10 @@ class Scheduler(SchedulerInterface):
2362 self.has_unfinished_requests()
2363 or self.has_finished_requests()
2364 or (self.connector is not None and self.connector.has_pending_push_work())
2365 + or (
2366 + self.ec_connector is not None
2367 + and self.ec_connector.has_pending_push_work()
2368 + )
2369 )
2370
2371 def reset_prefix_cache(