Repository navigation
fix(router): strip the DP rank from proxied GET worker URLs - #65
Merged
Merged
Conversation
With --intra-node-data-parallel-size > 1 every worker is DP-aware and its url() is http://host:port@<rank>. select_first_worker() returned that url(), so proxy_get_request requested http://host:port@1/v1/models, which parses as userinfo host:port and host 1 (0.0.0.1): /v1/models, /get_model_info, /get_server_info and /health_generate failed with a 500. Return base_url() instead; health checks already strip the rank and routed requests use endpoint_url().
nxphi47
marked this pull request as ready for review
October 27, 2026 07:22
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused bug fix that removes the DP rank from URLs used by the router's proxied GET endpoints, while leaving regular-worker URLs unchanged. The accompanying unit test covers the DP-aware case and the diff introduces no broader API, schema, or infrastructure changes. You can add or adjust custom eligibility rules. Learn more. |
samsja
approved these changes
Oct 27, 2026
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.
Bug
With
--intra-node-data-parallel-sizegreater than 1, these endpoints return a 500:GET /v1/modelsGET /get_model_infoGET /get_server_infoGET /health_generateThe error message is:
Inference requests (
/v1/chat/completionsand so on) are not affected.Cause
With intra-node DP, each worker's URL is tagged with its DP rank, e.g.
http://localhost:8100@1.select_first_worker()returned this tagged URL, andproxy_get_request()appended the endpoint to it. The router therefore requestedhttp://localhost:8100@1/v1/models. That URL parses as userlocalhost:8100at host1, which resolves to0.0.0.1.Inference requests already strip the tag via
base_url(), and health checks viaextract_dp_rank(). Only the proxied GETs used the tagged URL.Fix
select_first_worker()andselect_first_worker_for_model()now returnbase_url(). For a DP-aware worker that is the URL without@rank; for a regular worker it is unchanged.Tests
test_select_first_worker_dp_awareregisters four DP-aware workers and checks that the selected URL has no@rank.Testworkflow passed: nightly build,cargo test, clippy with-D warnings, and rustfmt.Trivy vulnerability scannerfails because it cannot download its vulnerability database. It fails the same way on the other open PRs (fix/raise-nofile-limit,feat/pd-merge-payload-fields)./healthand/v1/models:--intra-node-data-parallel-sizeGET /v1/modelsthrough the routerRequest failed: error sending request for url (http://0.0.0.0/v1/models)Why it matters
prime-rl starts this router with
--intra-node-data-parallel-sizeset to the vLLM data-parallel size. Every prime-rl inference server with DP > 1 therefore has a broken/v1/models. Three effects:skip_model_checkis set.max_model_len. This fails silently.