Skip to content

fix(router): strip the DP rank from proxied GET worker URLs - #65

Merged
nxphi47 merged 1 commit into
mainfrom
fix/dp-aware-proxy-get-url
Oct 27, 2026
Merged

nxphi47 merged 1 commit into
mainfrom
fix/dp-aware-proxy-get-url

Conversation

@nxphi47

@nxphi47 nxphi47 commented Oct 27, 2026 •

Copy link
Copy Markdown

Bug

With --intra-node-data-parallel-size greater than 1, these endpoints return a 500:

  • GET /v1/models
  • GET /get_model_info
  • GET /get_server_info
  • GET /health_generate

The error message is:

Request failed: error sending request for url (http://0.0.0.1/v1/models)

Inference requests (/v1/chat/completions and 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, and proxy_get_request() appended the endpoint to it. The router therefore requested http://localhost:8100@1/v1/models. That URL parses as user localhost:8100 at host 1, which resolves to 0.0.0.1.

Inference requests already strip the tag via base_url(), and health checks via extract_dp_rank(). Only the proxied GETs used the tagged URL.

Fix

select_first_worker() and select_first_worker_for_model() now return base_url(). For a DP-aware worker that is the URL without @rank; for a regular worker it is unchanged.

Tests

  • New unit test: test_select_first_worker_dp_aware registers four DP-aware workers and checks that the selected URL has no @rank.
  • CI: the Test workflow passed: nightly build, cargo test, clippy with -D warnings, and rustfmt.
  • Unrelated failure: Trivy vulnerability scanner fails 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).
  • Reproduction: run the v0.2.3 release binary in front of a stub worker that serves /health and /v1/models:
--intra-node-data-parallel-size GET /v1/models through the router
1 returns the stub's model list
2 Request 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-size set to the vLLM data-parallel size. Every prime-rl inference server with DP > 1 therefore has a broken /v1/models. Three effects:

  • prime-rl's eval and orchestrator model check fails at startup unless skip_model_check is set.
  • The orchestrator cannot read max_model_len. This fails silently.
  • Agent harnesses cannot read the context window, so they never compact automatically.

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
nxphi47 marked this pull request as ready for review October 27, 2026 07:22
@macroscopeapp

macroscopeapp Bot commented Oct 27, 2026

Copy link
Copy Markdown

Approvability

Verdict: Approved at a530aed

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.

@nxphi47
nxphi47 merged commit bed796e into main Oct 27, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants