fix(coordinator/kv-nixl): no do_remote_prefill without prefill remote_block_ids #4181
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.50) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 423 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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.362
Shallow Review Depth
shallow_review_depth
0.344
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #4181"
general
weight: 0.35
blacksoxx
What type of PR is this?
<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind flake
/kind performance
/kind release
/kind test
Optionally add one or more of the following kinds if applicable:
/kind deprecation
-->
/kind bug
What this PR does / why we need it:
When the coordinator runs a full
prefill → decodepipeline with thekv-nixlconnector and the prefill response carries nokv_transfer_params, the decode request still goes out with{"do_remote_decode": false, "do_remote_prefill": true}and noremote_block_ids. vLLM's NIXL scheduler readsdo_remote_prefillas "pull KV from a remote prefiller", allocates blocks for it, then finds nothing to pull and tripsassert num_external_tokens == 0. The assertion fires inside the EngineCore scheduling loop, where it is fatal: the engine process exits, every in-flight request on that decode pod fails, and the pod restarts and reloads the model.This path is not an edge case. prefill.go treats a prefill response without
kv_transfer_paramsas a degraded but acceptable outcome: it logsprefill returned no kv_transfer_params; decode will recompute the promptand continues.The comment there names the most common cause:
https://github.com/llm-d/llm-d-router/blob/82202afe27434aa2a03c361c035de56f92166315/pkg/coordinator/steps/prefill.go#L124-L132
So the default configuration plus a slightly older prefill pool, which should cost one extra prompt computation on decode, instead crashes a decode pod on every request. A pipeline with no
prefillstep andkv-nixlconfigured reaches the same path.Reproduction
Environment: one RTX 3090 Ti,
vllm/vllm-openai:v0.31.0(ships nixl 1.4.1) serving Qwen3-0.6B withNixlConnectorin thekv_bothrole; the coordinator built from upstream/main withkv_connector: kv-nixlandgateway.addresspointing straight at vLLM.The pipeline runs
decodealone: with noprefillstepKVTransferParamsis empty, which is the same state a prefill response withoutkv_transfer_paramsleaves behind, so the decode request carries the same{"do_remote_decode": false, "do_remote_prefill": true}body on one GPU without a prefill pool.One ordinary chat completions request through the coordinator:
500 {"error":{"message":"EngineCore encountered an issue. See stack trace (above) for the root cause.","type":"InternalServerError"}}.assert num_external_tokens == 0,AssertionError,EngineCore encountered a fatal error,EngineDeadError./healthno longer connects and the container has exited. A single request is enough.Controls: the same request sent directly to vLLM without
kv_transfer_paramsreturns 200, ruling out the model and the environment. Repeating the steps with the fixed coordinator returns 200,/healthstays 200, and the container keeps running.Which issue(s) this PR fixes:
<!--
*Automatically closes linked issue when PR is merged.
Usage:
Fixes #<issue number>, orFixes (paste link of issue).-->
Fixes #
Release note _(write
NONEif no user-facing change)_:``
release-note
``NONE