Skip to content

fix(pack): upgrade vllm-router in released CANN 0.30.0 images - #442

Merged
thxCode merged 1 commit into
gpustack:mainfrom
ddddddddwp:feat/cann-0-30-0-router-0-1-17
Nov 25, 2026
Merged

thxCode merged 1 commit into
gpustack:mainfrom
ddddddddwp:feat/cann-0-30-0-router-0-1-17

Conversation

@ddddddddwp

@ddddddddwp ddddddddwp commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Adds post-operation pack/.post_operation/20261124_vllm_upgrade_router/ to reinstall vllm-router 0.1.17 into the released Ascend CANN 9.2 vLLM 0.30.0 images.

The released images carry vllm-router 0.1.15, which predates vllm-project/router#360; that fix sets min_tokens=1 alongside max_tokens=1 on the internal prefill request. Without it, a prefill-only request can finish on its first token with FINISHED_STOPPED; both Ascend Mooncake connectors only return KV handoff parameters for FINISHED_LENGTH_CAPPED, so Decode is forwarded the original request with no remote blocks and can recompute the whole prompt. 0.1.17 is the first release carrying the fix.

Scope: the four released CANN 9.2 vLLM 0.30.0 tags, both platforms:

  • cann9.2-910b-vllm0.30.0
  • cann9.2-950-vllm0.30.0
  • cann9.2-a3-vllm0.30.0
  • cann9.2-310p-vllm0.30.0

Deliberately not included:

  • CANN 9.1 variants: deprecated=True in the catalog.
  • cuda13.0-vllm0.30.0: it carries the same router, but the reported failure is specific to the Ascend Mooncake connectors' FINISHED_LENGTH_CAPPED requirement. Extend the operation if the CUDA connector is confirmed to fail the same way.

Running the operation

The recipe builds on the existing images and only adds a wheel install; nothing is recompiled.

backend=cann
target=vllm
post_operation=20261124_vllm_upgrade_router
for_release=true
dry_run=true   # first, to check the jobs and tags

Then rerun with dry_run=false. As documented in pack/.post_operation/README.md, the run mutates the released tags, opens the chore: update runner PR with the regenerated gpustack_runner/runner.py.json (and fixtures), and the pending [ ] row in that README should be flipped to [x] once it completes.

Verification

  • pack/expand_matrix.sh with the inputs above expands to exactly 8 build jobs and 4 manifest jobs, with the tags listed above and linux/amd64 + linux/arm64 per tag.
  • uv run pytest tests/pack tests/gpustack_runner — 517 passed.
  • pre-commit run --files on the three changed files — YAML, whitespace, EOF, large files, merge conflict, private key and codespell hooks passed.
  • The repository's own _assert_runtime_recipe accepts the Dockerfile as a runtime recipe (named vllm stage, entrypoint, no probe/export instrumentation).
  • uv run mkdocs build --strict passed.
  • PyPI lists vllm_router-0.1.17-cp38-abi3-manylinux_2_28_{aarch64,x86_64}.whl, matching both platforms. Its wheel metadata declares the same six pure-Python web dependencies as 0.1.15, so the install replaces only the router.
  • Upstream v0.1.17 release notes state its product/CI images are pinned to vLLM 0.30.0.

Not verified here: the image build itself (Pack needs maintainer authorization and credentials) and the Ascend end-to-end scenario from the issue, which needs 910B hardware.

The CI workflow on this PR is currently action_required because the branch comes from a first-time contributor fork; a maintainer needs to approve the run before it executes.

Risks

  • The operation mutates already-published tags, which the repository documents as dangerous and non-reversible. A new tag instead would require a catalog/selection change on the GPUStack side.
  • Workers that already cached the old digest need to re-pull before the fix takes effect.
  • The router is upgraded inside a 0.30.0 image; upstream release notes tie 0.1.17 to vLLM 0.30.0, but the PD group should still be exercised on hardware.

ref #6889

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a post-operation to upgrade the vllm-router package to version 0.1.17 for CANN 9.2 vLLM 0.30.0 images across several hardware variants. The feedback suggests adding the --no-deps flag to the uv pip install command to prevent unintended upgrades of other shared dependencies in the base image.

vLLM Router 0.1.15 predates the fix that sets min_tokens=1 alongside
max_tokens=1 on the internal prefill request. On Ascend Mooncake PD a
prefill-only request can then finish on its first token with
FINISHED_STOPPED, which leaves Decode without KV handoff parameters and
lets it recompute the whole prompt.

Reinstall 0.1.17 into the released CANN 9.2 vLLM 0.30.0 images for all
four hardware variants and both platforms. The wheel is prebuilt for
aarch64 and x86_64 and declares the same dependencies as 0.1.15;
--no-deps keeps the install from resolving or moving anything else in
the image.

ref #6889

Signed-off-by: 邓伟平 <dengweiping@cecw.net>
@ddddddddwp
ddddddddwp force-pushed the feat/cann-0-30-0-router-0-1-17 branch from 6797589 to 28c12b4 Compare November 24, 2026 08:07
@yxf0314
yxf0314 self-requested a review November 24, 2026 08:14
@thxCode

thxCode commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Have you tried with v0.32.0?

@ddddddddwp

Copy link
Copy Markdown
Contributor Author

Verification on an Ascend 910B host (before/after)

We reproduced the issue and confirmed the fix with the real vllm-router binary on an internal Ascend 910B server. No server address or credentials are included.

Environment

Server internal Ascend 910B host, 8× Ascend 910B2 (64 GiB each), ARM64
GPUStack v2.3.0
Image quay.io/gpustack/runner:cann9.2-910b-vllm0.32.0 (stock vllm-router 0.1.17)
Comparison same image with uv pip install --no-deps vllm-router==0.1.15

The released CANN 9.2 vLLM 0.30.0 image itself was not on the host, and the root filesystem had only ~23 GB free; pulling the ~20 GB image would have put the machine at risk. The comparison therefore uses the same CANN 9.2 image family (0.32.0) and changes only the router package. That is the same delta this post-operation applies to 0.30.0, and the prefill request is constructed entirely inside vllm-router, independently of the engine version.

Method

  1. Took the stock image, which ships vllm-router 0.1.17, and built a copy with --no-deps downgraded to 0.1.15. Both images are identical except for the router.
  2. Ran the real vllm-router from each image in PD mode:
    vllm-router --host 127.0.0.1 --port 18000 \
      --vllm-pd-disaggregation --kv-connector nixl \
      --prefill http://127.0.0.1:18001 --decode http://127.0.0.1:18002
    
  3. Pointed the Prefill and Decode peers at local mock vLLM servers that record every request body.
  4. Sent one POST /v1/chat/completions through the router and read the captured Prefill request.

Result

vllm-router 0.1.15 — prefill request has a one-token budget and no floor:

{ "model": "m", "messages": [...], "max_tokens": 1,
  "kv_transfer_params": { "do_remote_decode": true, ... } }

vllm-router 0.1.17 — the same request now carries min_tokens:

{ "model": "m", "messages": [...], "max_tokens": 1, "min_tokens": 1,
  "kv_transfer_params": { "do_remote_decode": true, ... } }

With 0.1.15 a first-token EOS/stop ends Prefill with FINISHED_STOPPED, which the Ascend Mooncake connectors do not accept as a KV handoff, so Decode can recompute the prompt. With 0.1.17 the one-token prefill can only finish by length cap, matching FINISHED_LENGTH_CAPPED.

vllm-router 0.1.15 vs 0.1.17 prefill request

Host context (8× Ascend 910B2, GPUStack v2.3.0, vendor ascend):

Ascend 910B GPUs in GPUStack

Scope and limits

  • This is a router-level verification: it exercises the exact binary and the PD request path, but not NPU inference end to end.
  • The host was left unchanged: the temporary image and files were removed, no model or cluster configuration was touched.
  • After this PR is merged and Pack rebuilds the released 0.30.0 images, the remaining step is the full PD e2e from #6889: a cold-cache chat completion whose first token is EOS/stop, then checking FINISHED_LENGTH_CAPPED on Prefill and that Decode reuses the remote blocks.

ref #6889

@ddddddddwp

Copy link
Copy Markdown
Contributor Author

@thxCode yes — the verification I posted a few minutes after your comment was run on the v0.32.0 image: #442 (comment)

Concretely, on the Ascend host I compared the stock cann9.2-910b-vllm0.32.0 image (which already ships vllm-router 0.1.17) against the same image with only the router downgraded to 0.1.15 via uv pip install --no-deps. The captured Prefill request is the difference the operation is about: 0.1.15 sends max_tokens=1 without min_tokens; 0.1.17 sends both.

So v0.32.0 does not need this operation — its catalog rows already report vllm-router 0.1.17. The 0.30.0 rows still report 0.1.15, which is why the post-operation targets 0.30.0. I used 0.32.0 only as the test vehicle because the 0.30.0 image was not present on that host and there was not enough free disk to pull it; the prefill request is built entirely inside vllm-router, so the router swap isolates the same delta.

If the intent is to retire 0.30.0 in favour of 0.32.0 rather than patch it, that is a separate decision — 0.30.0 is still a selectable catalog row today. Also happy to extend the operation to cuda13.0-vllm0.30.0 (same router 0.1.15) if you want it covered.

ref #6889

@ddddddddwp

Copy link
Copy Markdown
Contributor Author

To expand on the v0.32.0 question, here is the exact matrix we ran and what each row proves.

Image vllm-router Captured Prefill request Result
stock cann9.2-910b-vllm0.32.0 0.1.17 "max_tokens": 1 + "min_tokens": 1 fixed
same image, router downgraded with uv pip install --no-deps vllm-router==0.1.15 0.1.15 "max_tokens": 1, no min_tokens issue reproduced

What "tried with v0.32.0" covered:

  1. Confirmed the stock v0.32.0 image ships vllm-router 0.1.17 (uv pip show vllm-router inside the image).
  2. Confirmed the post-operation command is a no-op on v0.32.0 — it installs the version that image already has, so v0.32.0 does not need this operation.
  3. Reproduced the issue on v0.32.0 itself by changing only the router package to 0.1.15. This isolates the behavior from the engine version: the same 0.32.0 engine produces the broken prefill with 0.1.15 and the correct one with 0.1.17.
  4. Ran the real vllm-router from each image in PD mode against two local mock vLLM peers and captured the Prefill body. Method and screenshots are in fix(pack): upgrade vllm-router in released CANN 0.30.0 images #442 (comment).

Why the PR still targets v0.30.0 rather than v0.32.0:

  • The catalog rows for cann9.2-* -vllm0.30.0 report vllm-router 0.1.15, while the -vllm0.32.0 rows already report 0.1.17.
  • v0.30.0 is still a selectable catalog row, so users on it still hit the bug; pointing them at v0.32.0 would be a separate deprecation decision, not a fix for the released image.

If by "tried with v0.32.0" you meant the full NPU PD inference e2e on that image, we have not run that part — the verification is at the router/request layer. I can run the full PD e2e (Prefill FINISHED_LENGTH_CAPPED, Decode reusing the remote blocks) on the 910B host if you want it before merge.

ref #6889

@ddddddddwp

Copy link
Copy Markdown
Contributor Author

Follow-up: full NPU PD inference e2e on v0.32.0

Yes — this run went through the full PD path on a v0.32.0 image, not just the router request capture.

Environment

Host internal Ascend server, 8× Ascend 910B2 (64 GiB each)
GPUStack v2.3.0
Image quay.io/gpustack/runner:cann9.2-910b-vllm0.32.0 (sha256:fb588579…)
Router vllm-router 0.1.17 (same image)
Prefill GPU 2 · HTTP :40119 · MooncakeConnectorV1 · kv_role=kv_producer · kv_port=45000
Decode GPU 3 · HTTP :40154 · MooncakeConnectorV1 · kv_role=kv_consumer · kv_port=45001
Router :40062 · --vllm-pd-disaggregation --kv-connector nixl · static prefill/decode peers

Method

  1. Started the real Prefill and Decode engines from the 0.32.0 image, both with the PD recipe's Mooncake connector and HCCL environment. Both reported healthy.
  2. Started vllm-router 0.1.17 from the same image in PD mode.
  3. Used the prompt Say hello in one short sentence.; its greedy first generated token is 151667. Sent a request with stop_token_ids: [151667] so the Prefill's first token is a stop token — the exact condition from the issue.
  4. Captured the router→Prefill request and the Prefill response.

Result

Client — HTTP 200, the request completes:

{
  "finish_reason": "stop",
  "stop_reason": 151667,
  "usage": {"prompt_tokens": 15, "completion_tokens": 1, "total_tokens": 16}
}

Router → Prefill request — the fix is in the one-token prefill:

{
  "max_tokens": 1,
  "min_tokens": 1,
  "stop_token_ids": [151667],
  "kv_transfer_params": {"do_remote_decode": true, "do_remote_prefill": false}
}

Prefill response — it no longer stops on the first token; it length-caps and returns the KV handoff:

{
  "finish_reason": "length",
  "kv_transfer_params": {
    "remote_host": "<redacted>",
    "remote_port": 45000,
    "num_prompt_blocks": 1,
    "remote_block_size": 128,
    "remote_prefill_cached_tokens": 0
  }
}

With min_tokens=1 the one-token Prefill finishes by length instead of FINISHED_STOPPED, and the Mooncake connector returns the handoff parameters. The Decode request then completes successfully.

Screenshots

v0.32.0 PD e2e evidence

GPUStack GPU page: 8× Ascend 910B2

Harness note

GPUStack v2.3.0's managed PD injection does not add --kv-transfer-config / /etc/hccn.conf for the custom backend version used on this host, so the two engines were launched directly from the 0.32.0 image with the recipe's connector. The image and vllm-router are the v0.32.0 release; the orchestration was manual. The 0.30.0 target still needs this post-operation to receive 0.1.17.

No server addresses or credentials are included; the internal host in remote_host is redacted as <redacted>. Screenshots contain no IP addresses.

ref #6889

@thxCode

thxCode commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

In fact, we hope users will apply the latest version(v0.32.0 at present), but we cannot guarantee the latest one is stable. (Ascend released v0.32.0rc1 only.) So, I think this can be merged, and repackaged as v0.30.0.

@thxCode thxCode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yxf0314 yxf0314 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thxCode
thxCode merged commit 58a93e0 into gpustack:main Nov 25, 2026
7 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.

3 participants