feat(router): add load-aware generate paths - #199
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c35714f5e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
0385fdd to
dc05d1e
Compare
dc05d1e to
8d88d15
Compare
8d88d15 to
7e94458
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d88d153c8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
4d15d57 to
ed0c3d5
Compare
Signed-off-by: Bruno Volpato <brunocvcunha@gmail.com>
ed0c3d5 to
0971b39
Compare
Purpose
Extensions can expose generate-compatible endpoints beyond
/inference/v1/generate. Unknown paths currently use transparent proxying, which bypasses typed request routing and cache-aware worker selection.Add
extra_generate_pathsand--extra-generate-paths. Each configured path:InferenceGenerateRequestschematoken_idsfor cache-aware routingThis lets integrations register endpoints without adding integration-specific routes or concepts to vLLM Router.
Compatibility
Configured paths retain transparent-proxy wire behavior:
Routing metadata and original JSON remain separate, so typed selection never rewrites payload shape. Prefill/decode routing receives explicit generate request kind instead of inferring it from payload fields.
Configured paths are validated before startup to reject duplicates and dynamic patterns. Extra paths dispatch from unmatched-route fallback, so built-in routes remain defined by Axum route table without duplicate reserved-path inventory.
Cancellation-safe global load accounting is intentionally separate in #200. Related consumer dependency/startup update: NovaSky-AI/SkyRL#1988.
Test Plan
/custom/v1/generateagainst two delayed workers.stream, nested values, priority, and unknown fields.Test Result
cargo fmt --all -- --check: passed.cargo clippy --all-targets --all-features -- -D warnings: passed.cargo test --all-features: passed, including 487 library tests and 51 API endpoint tests..venv/bin/pytest py_test/unit -q: 109 passed, 4 skipped.uvx black --check py_src py_test: passed.uvx ruff check py_src py_test: passed.git diff --check: passed.Essential Elements of an Effective PR Description Checklist