coordinator: forward cache_salt and priority on fresh prefill bodies #4128
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.44) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 254 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.332
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #4128"
general
weight: 0.35
blacksoxx
What type of PR is this?
/kind bug
What this PR does / why we need it:
For
/v1/completionsand/inference/v1/generate, the coordinator builds the prefill body from scratch with only the request id, model, prompt (or token ids) and transfer params. The client'scache_saltandpriorityare dropped. Chat Completions, Responses and Messages clone the client body, and decode forwards the client body on every API, so only these two prefill paths lose the fields.https://github.com/llm-d/llm-d-router/blob/489761f1a1c68059d14295ba858fadd7d516655d/pkg/coordinator/steps/prefill.go#L165-L192
vLLM mixes
cache_saltinto the hash of a prompt's first block, and every later block hash chains from it (vllm/v1/core/kv_cache_utils.py,generate_block_hash_extra_keys). Without the salt, the prefill pod caches a salted prompt under its unsalted hashes, and another tenant's unsalted request with the same prefix gets prefix-cache hits on it. That removes the isolationcache_saltprovides on a shared prefill pool. Prefill also ran at vLLM's default priority 0 instead of the client's value or the one the EPP injects.The two fresh-body branches now copy
cache_saltandpriorityfrom the client body when present. vLLM'sCompletionRequestandGenerateRequestboth accept these fields.FieldCacheSaltandFieldPriorityare added topkg/common/request.Which issue(s) this PR fixes:
Fixes #4127
Test plan:
cache_saltandpriority, and omit them when the client did not send them (fails before the fix)go test ./pkg/coordinator/... ./pkg/common/request/...Release note _(write
NONEif no user-facing change)_:``
release-notecache_saltThe coordinator forwards the client's
andpriorityto the prefill request on/v1/completionsand/inference/v1/generate. Salted prompts on these paths are no longer cached on the prefill pod under unsalted block hashes, and prefill runs at the client's priority.
``