[Bugfix][Core] Allow AuxOutput reset after abort without running requests (#59060)

Signed-off-by: aoshen02 <aoshen@inferact.ai> Co-authored-by: OpenAI Codex <codex@openai.com>

aoshen02 committed Sep 29, 2026 at 17:23 UTC 4861833ae280cf56e7802e6f2adb797031b51449
2 files changed +1 -17
tests/v1/core/test_scheduler.py
+1 -7
@@ -1562,13 +1562,7 @@ def test_scheduler_reset_prefix_cache():
1562 assert not scheduler.reset_prefix_cache()
1563 scheduler.aux_output_connector.reset.assert_not_called()
1564
1565 - with pytest.raises(RuntimeError, match=r"pause\(mode='keep'\)"):
1566 - scheduler.reset_prefix_cache(reset_running_requests=True)
1567 -
1568 - # pause(mode="keep") also waits for scheduled model outputs to drain.
1569 - scheduler.set_pause_state(PauseState.PAUSED_ALL)
1570 - with pytest.raises(RuntimeError, match="model output is in flight"):
1571 - scheduler.reset_prefix_cache(reset_running_requests=True)
1565 + # Pause completes pending model outputs before the caller resets the scheduler.
1566 for request in requests:
1567 request.num_in_flight_tokens = 0
1568
vllm/v1/core/sched/scheduler.py
-10
@@ -2781,16 +2781,6 @@ class Scheduler(SchedulerInterface):
2781 Otherwise, this method will only reset the KV prefix cache when there
2782 is no running requests taking KV cache.
2783 """
2784 - if reset_running_requests and self.aux_output_connector is not None:
2785 - if self._pause_state != PauseState.PAUSED_ALL:
2786 - raise RuntimeError(
2787 - "AuxOutput Connector only supports resetting running requests "
2788 - "after pause(mode='keep')."
2789 - )
2790 - if any(request.num_in_flight_tokens for request in self.requests.values()):
2791 - raise RuntimeError(
2792 - "AuxOutput Connector cannot reset while model output is in flight."
2793 - )
2784 if reset_running_requests:
2785 # For logging.
2786 timestamp = time.monotonic()