Repository navigation
[Feat][Router] Add /v1/systemone and /v1/decisions routes - #1173
Merged
Merged
Conversation
shernshiou
requested review from
ApostaC,
Shaoting-Feng,
YuhanLiu11 and
ruizhang0101
as code owners
October 22, 2026 19:45
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds support for the /v1/systemone and /v1/decisions endpoints, routing them through the general request handler. It also updates the prefix-aware routing logic to handle non-chat request shapes by extracting the prompt from state or input fields when prompt is absent, and serializing non-string values to JSON. A review comment points out that if any of these fields are explicitly set to null, they will be serialized to the string "null", potentially causing cache key collisions. It is recommended to handle None values explicitly.
Proxy vLLM Structured Decisions endpoints through route_general_request, like /v1/score. Both request bodies carry `model`, so existing routing works unchanged. Closes vllm-project#1165 Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Shern Shiou Tan <[email protected]>
PrefixAwareRouter read request_json["prompt"] unguarded, so any body without messages/prompt (/v1/systemone, /v1/decisions, /v1/embeddings, /v1/score, /v1/rerank) raised KeyError and returned 500. Batched list prompts also crashed the string-only HashTrie. Fall back to `state` (systemone) then `input` (decisions/embeddings), then "", and JSON-encode non-string values. Repeat systemone questions over the same state now pin to the backend holding it in prefix cache. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Shern Shiou Tan <[email protected]>
shernshiou
force-pushed
the
feat/systemone
branch
from
October 25, 2026 12:01
38e832a to
e64871b
Compare
bcdonadio
added a commit
to powerhome/vllm-production-stack
that referenced
this pull request
Nov 12, 2026
* [Bugfix][Router] Read vllm:kv_cache_usage_perc for KV cache usage (vllm-project#1118) Signed-off-by: Muhammad Ibrahim <[email protected]> * [Doc] Add Simplified Chinese translation (README.zh.md) (vllm-project#1136) Signed-off-by: YE <[email protected]> * [CI/Build] Run helm unittest in CI and fix two broken tests (vllm-project#1131) Signed-off-by: zjjkee <[email protected]> * [Bugfix][Router] Key request stats by dispatch, not by X-Request-Id (vllm-project#1115) Signed-off-by: David-Wu1119 <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Rui Zhang <[email protected]> * [Bugfix][Router] Use least-inflight for PrefixAware below-threshold fallback (vllm-project#1089) Signed-off-by: Dundy Pasupuleti <[email protected]> * [Bugfix][Router] Keep P/D model labels when dynamic config reloads the router (vllm-project#1129) Signed-off-by: MinJun Choi <[email protected]> * [Bugfix] Match KEDA scalers to enabled model deployments (vllm-project#1142) Signed-off-by: bojiang-li <[email protected]> * [Router] added pooling route (vllm-project#1112) Signed-off-by: [email protected] <[email protected]> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Rui Zhang <[email protected]> * [CI] Drop host docker prune from runner-cleanup workflow (vllm-project#1174) Signed-off-by: Rui Zhang <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * [Feat][Router] Add /v1/systemone and /v1/decisions routes (vllm-project#1173) Signed-off-by: Shern Shiou Tan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * [CI/Build] Stop k8s routing tests when the engine pods never become ready (vllm-project#1134) Signed-off-by: MinJun Choi <[email protected]> * [Bugfix][Router] Upgrade aiohttp and vllm (0.33.0) to resolve router image CVEs (vllm-project#1185) Signed-off-by: Shern Shiou Tan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * Bump chart version to 0.1.14 (vllm-project#1190) Signed-off-by: Rui Zhang <[email protected]> --------- Signed-off-by: Muhammad Ibrahim <[email protected]> Signed-off-by: YE <[email protected]> Signed-off-by: zjjkee <[email protected]> Signed-off-by: David-Wu1119 <[email protected]> Signed-off-by: Dundy Pasupuleti <[email protected]> Signed-off-by: MinJun Choi <[email protected]> Signed-off-by: bojiang-li <[email protected]> Signed-off-by: [email protected] <[email protected]> Signed-off-by: Rui Zhang <[email protected]> Signed-off-by: Shern Shiou Tan <[email protected]> Signed-off-by: MinJun Choi <[email protected]> Signed-off-by: Rui Zhang <[email protected]> Signed-off-by: Bernardo Donadio <[email protected]> Co-authored-by: Muhammad Ibrahim <[email protected]> Co-authored-by: YE <[email protected]> Co-authored-by: Jingke zou <[email protected]> Co-authored-by: Yanze (David) Wu <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Rui Zhang <[email protected]> Co-authored-by: Dundy Pasupuleti <[email protected]> Co-authored-by: MinJun Choi <[email protected]> Co-authored-by: Bojiang Li <[email protected]> Co-authored-by: MaelvanDijk <[email protected]> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Shern Shiou Tan <[email protected]>
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.
FIX #1165
Summary
The router now proxies vLLM's Structured Decisions endpoints:
/v1/systemone(in vLLM 0.32.0) and/v1/decisions(on vLLM main, not yet released). Both request bodies carrymodel, so they reuseroute_general_requestunchanged, the same as/v1/score.Under
--routing-logic prefixaware, these bodies crashed withKeyError: 'prompt'(500), because they carry neithermessagesnorprompt./v1/score,/v1/rerank,/v1/embeddings, and completions with a list prompt already crashed the same way. The second commit fixes that:Keying on
statesends repeat questions about the same state to the backend that already has it in prefix cache. That is what vLLM's--enable-prefix-cachingguidance for this API relies on.Not included: a
decisionsmodel type for--static-model-types(it only affects health probes, not routing) and a wildcard/v1/system*proxy (the router registers routes explicitly).Evidence
Unit tests: 281 passed. New tests:
test_decisions_routes.py: both paths are registered and forward the right endpoint.test_prefixaware_router.py: six body shapes route instead of raising, and a same-staterequest pins to the same backend. 6 of these fail without the fix.E2E on an RTX 4090. Qwen/Qwen3-0.6B, two vLLM backends, router with
--service-discovery static.7b1164d, the base):POST /v1/systemoneand/v1/decisionsreturn 404 from the router itself (zeroRouting requestlog lines)./v1/systemone, round-robin/v1/systemone, prefix-awareKeyError)prompt, prefix-awaremodel/ unknown modelstate, different questionsstatesTraceback/KeyErrorin router logs0.32.1rc1.dev326+gc722f3a53, which serves/v1/decisions):/v1/decisionsreturns 200 direct to the backend, through round-robin and through prefix-aware routing, with the same answer structure each time. 6 requests sharing oneinputpinned to one backend.On vLLM 0.32.0 itself,
/v1/decisionsreturns the backend's own 404, which the router passes through.Merge Danger
Door: two-way
Additive routes plus a fallback in one branch of
PrefixAwareRouter. Reverting either commit is clean.Blast Radius: prefix-aware routing
Only
--routing-logic prefixawarechanges behaviour:input.-swhen doinggit commit[Bugfix],[Feat], and[CI].🤖 Generated with Claude Code