Repository navigation
[Router][Bugfix] Propagate client cancellation - #12
Merged
Levi080513 merged 2 commits intoNov 26, 2026
Merged
Conversation
Levi080513
marked this pull request as ready for review
November 26, 2026 14:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a client disconnected while the Router was waiting for backend response headers or a connection-pool slot, the pending backend request could remain alive. It could reach the backend after the client had aborted, while Router request statistics and pool state remained occupied.
Change
http.disconnect.This adapts the behavior proposed by upstream production-stack PR vllm-project#1040 to the Neutree fork. The upstream PR is not merged. The fork's existing request-statistics cleanup is retained.
Test plan
Unit test
PYTHONPATH=src python -m pytest -q src/tests— 105 passed.StreamingResponse.pre-commit run --files src/vllm_router/services/request_service/request.py src/tests/test_client_disconnect.py src/tests/test_inference_api_routes.py src/tests/test_request_stats.py— passed.vllm_router._versionwarning; no test failures.DB test
E2E test