Skip to content

[Rust Frontend] Add per-request timing metrics to chat and completions - #59314

Merged
njhill merged 6 commits into
vllm-project:mainfrom
xinnywinne:feat/rust-per-request-metrics
Oct 12, 2026
Merged

njhill merged 6 commits into
vllm-project:mainfrom
xinnywinne:feat/rust-per-request-metrics

Conversation

@xinnywinne

@xinnywinne xinnywinne commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Implements the per-request metrics (--enable-per-request-metrics) roadmap item in #44280. Speculative-decoding acceptance stats remain a separate checklist item.

Summary

  • Accept --enable-per-request-metrics in the Rust frontend and reject it alongside --disable-log-stats.
  • Carry the engine's queue, schedule, first-token, and last-token timestamps through decoded text and chat output.
  • Return Python-compatible timing fields in non-streaming /v1/chat/completions and /v1/completions responses. For streaming, attach them to the final usage chunk when stream_options.include_usage is enabled.
  • Serialize unavailable timing fields as null in non-streaming responses and omit them from streaming usage chunks, matching Python's recursive exclude_none=True behavior.

Implementation detail

Each engine output carries the current request-timestamp snapshot. This is required because the Rust text decoder can terminate a request locally after matching a stop string, before the engine emits a terminal output. Keeping the snapshot with the current output lets that path report valid metrics; limiting timestamps to engine-terminal outputs caused the Rust frontend to panic in Buildkite CI. The snapshot is four f64 values and does not add GPU synchronization.

Scope

Speculative-decoding acceptance metrics are intentionally not included in this PR. GenerateOutput already carries terminal spec_decode_metrics, but mapping those values into the OpenAI PerRequestMetrics.speculative_decoding response field is separate follow-up work.

Duplicate-work check

Tests

  • cargo fmt --all — passed.
  • cargo test -p vllm-llm -p vllm-text -p vllm-chat -p vllm-server -p vllm-cmd --quiet -- --test-threads=1 — passed (1,019 tests passed, 1 ignored). An earlier parallel rerun intermittently missed an unrelated preprocess_audio_secs snapshot key in vllm-chat; that test passed in isolation and in the serial suite.
  • cargo check --workspace --tests — passed after the review updates.
  • After rebasing onto current main: cargo test -p vllm-text passed (105 passed, 1 network test ignored), cargo test -p vllm-llm --test generate passed (12 passed), and cargo test -p vllm-chat --lib passed (355 passed).
  • Focused vllm-server metric, completion, and streaming tests — passed.
  • cargo clippy -p vllm-llm -p vllm-text -p vllm-server --all-targets -- -D warnings — passed after the rebase and stop-string fix.
  • Pre-commit hooks for the stop-string fix — passed.
  • Ruff, pre-commit, and Python collection for test_chat_completion.py — passed. The existing Rust frontend Buildkite step runs this file and now covers non-streaming metrics and the final streaming usage chunk.
  • Live serving on NVIDIA A100X with cached HuggingFaceTB/SmolLM2-135M-Instruct and --enable-per-request-metrics:
    • normal non-streaming chat/completions and streaming final usage chunks returned timing metrics;
    • a frontend-matched stop-string request returned finish_reason: "stop", valid metrics, and left the server healthy;
    • streaming stop-string output emitted metrics only on the final usage chunk.
      This validates response behavior and the CI reproducer, not model accuracy or performance.

AI assistance

AI assistance was used to implement and test this change. The human submitter reviewed and tested the original implementation and will review the latest reviewer-driven update before merge.

@claude claude 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@BugenZhao

Copy link
Copy Markdown
Member

[AUTOMATED] @codex review

@xinnywinne
xinnywinne force-pushed the feat/rust-per-request-metrics branch from 615309a to a3f8502 Compare October 5, 2026 22:51

@njhill njhill left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Formulas and the --disable-log-stats validation match the Python implementation. A few structural comments inline.

Separately: could you add e2e coverage that runs against the Rust frontend in .buildkite/test_areas/rust_frontend.yaml (as #54883 did with test_include_reasoning.py), checking metrics on a non-streaming response and on the final usage chunk? That keeps the two frontends' wire output from drifting.

Comment thread rust/src/chat/src/event.rs Resolved
Comment thread rust/src/llm/src/output.rs Resolved

Copy link
Copy Markdown
Contributor Author

Addressed the review in 50e8eca7. I also added API-level coverage to tests/entrypoints/openai/chat_completion/test_chat_completion.py: one non-streaming response check and one final streaming usage-chunk check, including omission of unset nested metric fields. That file is already run by .buildkite/test_areas/rust_frontend.yaml, so the new cases exercise the Rust frontend without adding another model fixture.

@BugenZhao BugenZhao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rest LGTM. Thanks @xinnywinne! I'll push a few minor simplifications.

@BugenZhao BugenZhao added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

✅ @xinnywinne, CI is now available for this PR.

  • /ci run starts upstream CI; /amd-ci run starts AMD CI only.
  • Your branch must contain every commit currently on its upstream target branch. Merge or rebase onto the latest target branch, then rerun the command. Append --allow-stale to a run command to test an outdated branch at your own risk.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.
  • /amd-ci retry retries failed jobs in AMD CI for the current PR head. Use /amd-ci run when the current head has no AMD CI build.
  • /ci cancel cancels scheduled or running CI builds for this PR branch; /amd-ci cancel does the same for AMD CI only.

@BugenZhao

Copy link
Copy Markdown
Member

/ci run

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #93851 for commit 60b6ba8cd334.

@BugenZhao
BugenZhao enabled auto-merge (squash) October 9, 2026 13:28
@mergify

mergify Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @xinnywinne.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Oct 9, 2026

@njhill njhill left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @xinnywinne, please rebase again!

auto-merge was automatically disabled October 9, 2026 21:49

Head branch was pushed to by a user without write access

@xinnywinne
xinnywinne force-pushed the feat/rust-per-request-metrics branch from 60b6ba8 to 40b65b1 Compare October 9, 2026 21:49
@mergify mergify Bot removed the needs-rebase label Oct 9, 2026
@xinnywinne

Copy link
Copy Markdown
Contributor Author

/ci run

1 similar comment
@njhill

njhill commented Oct 9, 2026

Copy link
Copy Markdown
Member

/ci run

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #93926 for commit 40b65b188007.

@njhill

njhill commented Oct 10, 2026

Copy link
Copy Markdown
Member

There are some test failures which look probably related.

@mergify

mergify Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @xinnywinne.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Oct 12, 2026
@vllm-agent

vllm-agent commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

CI selector (shadow): no narrower answer, every step runs: 195 test steps (271 jobs) instead of 9 (9 jobs)

Shadow mode: this changes nothing about what CI runs. It shows what the evidence-based selector would pick for this PR, next to today's rules. How it works.

Feedback welcome: reply here if it would skip a step this change needs, or runs something unrelated.

steps (jobs) Today's rules Selector Would skip Would add
NVIDIA, CPU and others 9 (9) 195 (271) 0 (0) 186 (262)
AMD mirrors 7 (7) 163 (227) 0 (0) 156 (220)

Why: rust: rust/src/chat/src/event.rs: root crate bucket; 16 gate-env steps + 12 hardware-image steps; + the PyO3 bridge claim (vllm/tool_parsers/rust_tool_parser.py)

Selector would run (195)
  • amd-fp8-moe-kernels-mi355
  • amd-kernels-mi355
  • amd-lm-eval-small-models-harness
  • amd-native-quantization-kernels-mi355
  • amd-qwen3-next-mtp-async-eplb-accuracy
  • arm-cpu-test ×3
  • ascend-npu-test
  • async-engine-inputs-utils-worker
  • basic-correctness ×2
  • basic-correctness-cpu-offload
  • basic-correctness-cumem
  • basic-correctness-prefetch-offload
  • basic-correctness-sleep-mode
  • basic-models-test-other-cpu
  • basic-models-tests-extra-initialization ×14
  • basic-models-tests-initialization
  • basic-models-tests-other
  • batch-invariance-b200
  • batch-invariance-h100
  • benchmarks-cli-test
  • cpu-distributed-tests-dp-tp
  • cpu-distributed-tests-pp-tp
  • cpu-kernel-tests ×2
  • cpu-language-generation-and-pooling-model-tests ×3
  • cpu-multi-modal-model-tests-n ×4
  • cpu-multimodal-config
  • cpu-params-env-tokenizers-parser
  • cpu-quantization-model-tests
  • cpu-qwen2-5-vl-multimodal-tests
  • cpu-reasoning-renderers
  • cpu-spec-decode-tests
  • cpu-tool-parsers
  • crcr-report
  • crosslayer-kv-layout-distributed-nixlconnector-pd-accuracy-tests-4-gpus
  • cudagraph
  • deepseek-v4-kernel-test-b200
  • deepseek-v4-kernel-test-h100
  • distributed-comm-ops
  • distributed-compile-comm-4-gpus
  • distributed-compile-rpc-tests-2-gpus
  • distributed-compile-unit-tests-2xh100
  • distributed-dp-tests-2-gpus
  • distributed-dp-tests-4-gpus
  • distributed-flashinfer-nixlconnector-pd-accuracy-4-gpus
  • distributed-model-tests-2-gpus ×3
  • distributed-mooncakeconnector-pd-accuracy-4-gpus
  • distributed-nixlconnector-pd-accuracy-4-gpus
  • distributed-torchrun-examples-4-gpus
  • distributed-torchrun-shutdown-tests-2-gpus
  • docker-build-metadata
  • dp-ep-distributed-nixlconnector-pd-accuracy-tests-4-gpus
  • dsv41-mono-decode-numerics-amd
  • e2e-core-1-gpu
  • e2e-core-large-memory
  • e2e-scheduling-1-gpu
  • e2e-scheduling-accuracy-1-gpu
  • elastic-ep-scaling-test
  • engine
  • engine-1-gpu
  • entrypoints-integration-api-server ×4
  • entrypoints-integration-api-server-generate
  • entrypoints-integration-api-server-openai-chat_completion
  • entrypoints-integration-api-server-openai-completion
  • entrypoints-integration-llm
  • entrypoints-integration-multimodal
  • entrypoints-integration-pooling
  • entrypoints-integration-responses-api
  • entrypoints-integration-speech_to_text
  • entrypoints-unit-tests
  • eplb-algorithm
  • eplb-execution
  • examples
  • extract-hidden-states-integration
  • extract-hidden-states-integration-2-gpus
  • fault-tolerance-e2e-2xh100
  • fusion-and-compile-unit-tests-2xb200
  • fusion-e2e-config-sweep-h100
  • fusion-e2e-quick-h100
  • fusion-e2e-tp2-ar-rms-config-sweep-h100
  • fusion-e2e-tp2-ar-rms-dynamo-partition-amd
  • fusion-e2e-tp2-ar-rms-inductor-partition-amd
  • fusion-e2e-tp2-b200
  • fusion-e2e-tp2-quick-h100
  • gemm-rs-ar-2xb200
  • glm5next-unit-tests
  • hybrid-ssm-nixlconnector-pd-accuracy-tests-4-gpus
  • hybrid-ssm-nixlconnector-pd-prefix-cache-2-gpus
  • inkling-unit-tests-b200
  • intel-hpu-test
  • jit-monitor-no-runtime-jit
  • kernels-attention-diffkv-test-h100
  • kernels-attention-test ×7
  • kernels-b200 ×3
  • kernels-core-operation-test ×3
  • kernels-deepgemm-test-h100
  • kernels-fla-ops-test-b200
  • kernels-flashmla-test-h100
  • kernels-fusedmoe-layer-test-2-b200s
  • kernels-fusedmoe-layer-test-2-h100s
  • kernels-helion-test ×5
  • kernels-mamba-test
  • kernels-mhc-test-b200
  • kernels-minimax-m3-attention-b200
  • kernels-minimax-reduce-rms-test-2-gpus
  • kernels-moe-test ×5
  • kernels-quantization-test ×6
  • kernels-root-misc-test-b200
  • kimi-k3-prefix-cache-4xb200 ×2
  • kimi-k3-unit-tests-b200
  • kv-offload-large
  • kv-offload-medium
  • kv-offload-small
  • language-models-tests-extra-standard ×2
  • language-models-tests-granite-l4-compatibility
  • language-models-tests-hybrid ×2
  • language-models-tests-standard
  • lm-eval-dspark-watermark-2xh100
  • lm-eval-small-models
  • lm-eval-turboquant-k3v4nc
  • lm-eval-turboquant-k8v4
  • lm-eval-turboquant-t3nc
  • lm-eval-turboquant-t4nc
  • lm-eval-watermarking
  • lora ×4
  • lora-tp-distributed ×4
  • metrics-tracing-2-gpus
  • model-executor
  • mooncake-ec-tcp-e2e-2-gpus
  • mrcr-eval-small-models
  • multi-modal-accuracy-eval-small-models
  • multi-modal-models-standard-1-qwen2
  • multi-modal-models-standard-2-qwen3-gemma
  • multi-modal-models-standard-3-llava-qwen2-vl
  • multi-modal-models-standard-4-other-whisper
  • multi-modal-processor ×4
  • multi-modal-processor-cpu ×4
  • multiconnector-nixl-offloading-pd-accuracy-2-gpus
  • multiconnector-nixl-offloading-pd-edge-cases-2-gpus
  • nixlconnector-pd-edge-cases-2-gpus
  • openai-api-correctness
  • pipeline-context-parallelism-4-gpus
  • platform-tests
  • plugin-tests-2-gpus
  • push-nixlconnector-pp-prefill-pd-accuracy-4-gpus
  • pytorch-compilation-dynamic-shapes
  • pytorch-compilation-passes-unit-tests
  • pytorch-compilation-unit-tests
  • pytorch-compilation-unit-tests-h100
  • pytorch-fullgraph-cudagraph-l4-compatibility
  • pytorch-fullgraph-test
  • pytorch-nightly-dependency-override-check
  • quantization ×4
  • quantized-fusions
  • quantized-models-test
  • quantized-moe-test-b200
  • qwen4-exp-sp-tests-4-gpus
  • qwen4-exp-unit-tests
  • qwen4-exp-unit-tests-cpu
  • ray-dependency-compatibility-check
  • rayexecutorv2-4-gpus
  • regression
  • replayssm-e2e
  • rl-entrypoints-tests
  • rust-frontend-cargo-style-clippy
  • rust-frontend-cargo-tests
  • rust-frontend-core-correctness
  • rust-frontend-distributed
  • rust-frontend-openai-coverage
  • rust-frontend-serve-admin-coverage
  • rust-frontend-tool-use
  • samplers-multimodal-beam-search
  • samplers-test
  • scale-out-ec-e2e-2-gpus
  • sharded-rdt-weight-transfer
  • spec-decode-draft-model ×4
  • spec-decode-eagle-1-deepseek-qwen
  • spec-decode-eagle-2-llama3-qwen-vl-other
  • spec-decode-mtp-deepseek-mimo
  • spec-decode-mtp-gemma4
  • spec-decode-mtp-qwen3-5
  • spec-decode-ngram-suffix
  • spec-decode-speculators
  • torch-stable-abi-audit
  • v1-attention-b200 ×2
  • v1-attention-h100-mi300 ×2
  • v1-core
  • v1-executor-worker
  • v1-kv-connectors ×4
  • v1-kv-offload
  • v1-logits-oracle
  • v1-metrics-lmeval
  • v1-others-cpu
  • v1-sample
  • v1-spec-decode
  • vllm-ir-tests
Would skip (today's rules run them) (0)

none

Would add (today's rules do not run them) (186)
  • amd-fp8-moe-kernels-mi355 (code map)
  • amd-kernels-mi355 (code map)
  • amd-lm-eval-small-models-harness (code map)
  • amd-native-quantization-kernels-mi355 (code map)
  • amd-qwen3-next-mtp-async-eplb-accuracy (code map)
  • arm-cpu-test ×3 (code map)
  • ascend-npu-test (code map)
  • async-engine-inputs-utils-worker (code map)
  • basic-correctness ×2 (code map)
  • basic-correctness-cpu-offload (code map)
  • basic-correctness-cumem (code map)
  • basic-correctness-prefetch-offload (code map)
  • basic-correctness-sleep-mode (code map)
  • basic-models-test-other-cpu (code map)
  • basic-models-tests-extra-initialization ×14 (code map)
  • basic-models-tests-initialization (code map)
  • basic-models-tests-other (code map)
  • batch-invariance-b200 (code map)
  • batch-invariance-h100 (code map)
  • benchmarks-cli-test (code map)
  • cpu-distributed-tests-dp-tp (code map)
  • cpu-distributed-tests-pp-tp (code map)
  • cpu-kernel-tests ×2 (code map)
  • cpu-language-generation-and-pooling-model-tests ×3 (code map)
  • cpu-multi-modal-model-tests-n ×4 (code map)
  • cpu-multimodal-config (code map)
  • cpu-params-env-tokenizers-parser (code map)
  • cpu-quantization-model-tests (code map)
  • cpu-qwen2-5-vl-multimodal-tests (code map)
  • cpu-reasoning-renderers (code map)
  • cpu-spec-decode-tests (code map)
  • cpu-tool-parsers (code map)
  • crcr-report (code map)
  • crosslayer-kv-layout-distributed-nixlconnector-pd-accuracy-tests-4-gpus (code map)
  • cudagraph (code map)
  • deepseek-v4-kernel-test-b200 (code map)
  • deepseek-v4-kernel-test-h100 (code map)
  • distributed-comm-ops (code map)
  • distributed-compile-comm-4-gpus (code map)
  • distributed-compile-rpc-tests-2-gpus (code map)
  • distributed-compile-unit-tests-2xh100 (code map)
  • distributed-dp-tests-2-gpus (code map)
  • distributed-dp-tests-4-gpus (code map)
  • distributed-flashinfer-nixlconnector-pd-accuracy-4-gpus (code map)
  • distributed-model-tests-2-gpus ×3 (code map)
  • distributed-mooncakeconnector-pd-accuracy-4-gpus (code map)
  • distributed-nixlconnector-pd-accuracy-4-gpus (code map)
  • distributed-torchrun-examples-4-gpus (code map)
  • distributed-torchrun-shutdown-tests-2-gpus (code map)
  • docker-build-metadata (code map)
  • dp-ep-distributed-nixlconnector-pd-accuracy-tests-4-gpus (code map)
  • dsv41-mono-decode-numerics-amd (code map)
  • e2e-core-1-gpu (code map)
  • e2e-core-large-memory (code map)
  • e2e-scheduling-1-gpu (code map)
  • e2e-scheduling-accuracy-1-gpu (code map)
  • elastic-ep-scaling-test (code map)
  • engine (code map)
  • engine-1-gpu (code map)
  • entrypoints-integration-api-server ×4 (code map)
  • entrypoints-integration-api-server-generate (code map)
  • entrypoints-integration-llm (code map)
  • entrypoints-integration-multimodal (code map)
  • entrypoints-integration-pooling (code map)
  • entrypoints-integration-responses-api (code map)
  • entrypoints-integration-speech_to_text (code map)
  • entrypoints-unit-tests (code map)
  • eplb-algorithm (code map)
  • eplb-execution (code map)
  • examples (code map)
  • extract-hidden-states-integration (code map)
  • extract-hidden-states-integration-2-gpus (code map)
  • fault-tolerance-e2e-2xh100 (code map)
  • fusion-and-compile-unit-tests-2xb200 (code map)
  • fusion-e2e-config-sweep-h100 (code map)
  • fusion-e2e-quick-h100 (code map)
  • fusion-e2e-tp2-ar-rms-config-sweep-h100 (code map)
  • fusion-e2e-tp2-ar-rms-dynamo-partition-amd (code map)
  • fusion-e2e-tp2-ar-rms-inductor-partition-amd (code map)
  • fusion-e2e-tp2-b200 (code map)
  • fusion-e2e-tp2-quick-h100 (code map)
  • gemm-rs-ar-2xb200 (code map)
  • glm5next-unit-tests (code map)
  • hybrid-ssm-nixlconnector-pd-accuracy-tests-4-gpus (code map)
  • hybrid-ssm-nixlconnector-pd-prefix-cache-2-gpus (code map)
  • inkling-unit-tests-b200 (code map)
  • intel-hpu-test (code map)
  • jit-monitor-no-runtime-jit (code map)
  • kernels-attention-diffkv-test-h100 (code map)
  • kernels-attention-test ×7 (code map)
  • kernels-b200 ×3 (code map)
  • kernels-core-operation-test ×3 (code map)
  • kernels-deepgemm-test-h100 (code map)
  • kernels-fla-ops-test-b200 (code map)
  • kernels-flashmla-test-h100 (code map)
  • kernels-fusedmoe-layer-test-2-b200s (code map)
  • kernels-fusedmoe-layer-test-2-h100s (code map)
  • kernels-helion-test ×5 (code map)
  • kernels-mamba-test (code map)
  • kernels-mhc-test-b200 (code map)
  • kernels-minimax-m3-attention-b200 (code map)
  • kernels-minimax-reduce-rms-test-2-gpus (code map)
  • kernels-moe-test ×5 (code map)
  • kernels-quantization-test ×6 (code map)
  • kernels-root-misc-test-b200 (code map)
  • kimi-k3-prefix-cache-4xb200 ×2 (code map)
  • kimi-k3-unit-tests-b200 (code map)
  • kv-offload-large (code map)
  • kv-offload-medium (code map)
  • kv-offload-small (code map)
  • language-models-tests-extra-standard ×2 (code map)
  • language-models-tests-granite-l4-compatibility (code map)
  • language-models-tests-hybrid ×2 (code map)
  • language-models-tests-standard (code map)
  • lm-eval-dspark-watermark-2xh100 (code map)
  • lm-eval-small-models (code map)
  • lm-eval-turboquant-k3v4nc (code map)
  • lm-eval-turboquant-k8v4 (code map)
  • lm-eval-turboquant-t3nc (code map)
  • lm-eval-turboquant-t4nc (code map)
  • lm-eval-watermarking (code map)
  • lora ×4 (code map)
  • lora-tp-distributed ×4 (code map)
  • metrics-tracing-2-gpus (code map)
  • model-executor (code map)
  • mooncake-ec-tcp-e2e-2-gpus (code map)
  • mrcr-eval-small-models (code map)
  • multi-modal-accuracy-eval-small-models (code map)
  • multi-modal-models-standard-1-qwen2 (code map)
  • multi-modal-models-standard-2-qwen3-gemma (code map)
  • multi-modal-models-standard-3-llava-qwen2-vl (code map)
  • multi-modal-models-standard-4-other-whisper (code map)
  • multi-modal-processor ×4 (code map)
  • multi-modal-processor-cpu ×4 (code map)
  • multiconnector-nixl-offloading-pd-accuracy-2-gpus (code map)
  • multiconnector-nixl-offloading-pd-edge-cases-2-gpus (code map)
  • nixlconnector-pd-edge-cases-2-gpus (code map)
  • openai-api-correctness (code map)
  • pipeline-context-parallelism-4-gpus (code map)
  • platform-tests (code map)
  • plugin-tests-2-gpus (code map)
  • push-nixlconnector-pp-prefill-pd-accuracy-4-gpus (code map)
  • pytorch-compilation-dynamic-shapes (code map)
  • pytorch-compilation-passes-unit-tests (code map)
  • pytorch-compilation-unit-tests (code map)
  • pytorch-compilation-unit-tests-h100 (code map)
  • pytorch-fullgraph-cudagraph-l4-compatibility (code map)
  • pytorch-fullgraph-test (code map)
  • pytorch-nightly-dependency-override-check (code map)
  • quantization ×4 (code map)
  • quantized-fusions (code map)
  • quantized-models-test (code map)
  • quantized-moe-test-b200 (code map)
  • qwen4-exp-sp-tests-4-gpus (code map)
  • qwen4-exp-unit-tests (code map)
  • qwen4-exp-unit-tests-cpu (code map)
  • ray-dependency-compatibility-check (code map)
  • rayexecutorv2-4-gpus (code map)
  • regression (code map)
  • replayssm-e2e (code map)
  • rl-entrypoints-tests (code map)
  • samplers-multimodal-beam-search (code map)
  • samplers-test (code map)
  • scale-out-ec-e2e-2-gpus (code map)
  • sharded-rdt-weight-transfer (code map)
  • spec-decode-draft-model ×4 (code map)
  • spec-decode-eagle-1-deepseek-qwen (code map)
  • spec-decode-eagle-2-llama3-qwen-vl-other (code map)
  • spec-decode-mtp-deepseek-mimo (code map)
  • spec-decode-mtp-gemma4 (code map)
  • spec-decode-mtp-qwen3-5 (code map)
  • spec-decode-ngram-suffix (code map)
  • spec-decode-speculators (code map)
  • torch-stable-abi-audit (code map)
  • v1-attention-b200 ×2 (code map)
  • v1-attention-h100-mi300 ×2 (code map)
  • v1-core (code map)
  • v1-executor-worker (code map)
  • v1-kv-connectors ×4 (code map)
  • v1-kv-offload (code map)
  • v1-logits-oracle (code map)
  • v1-metrics-lmeval (code map)
  • v1-others-cpu (code map)
  • v1-sample (code map)
  • v1-spec-decode (code map)
  • vllm-ir-tests (code map)
AMD mirrors: would skip (0)

none

AMD mirrors: would add (156)
  • async-engine-inputs-utils-worker (code map)
  • basic-correctness ×2 (code map)
  • basic-correctness-cpu-offload (code map)
  • basic-correctness-cumem (code map)
  • basic-correctness-prefetch-offload (code map)
  • basic-correctness-sleep-mode (code map)
  • basic-models-tests-extra-initialization ×14 (code map)
  • basic-models-tests-initialization (code map)
  • basic-models-tests-other (code map)
  • batch-invariance-a100 (code map)
  • batch-invariance-b200 (code map)
  • batch-invariance-h100 (code map)
  • benchmarks-cli-test (code map)
  • crosslayer-kv-layout-distributed-nixlconnector-pd-accuracy-tests-4-gpus (code map)
  • cudagraph (code map)
  • deepseek-v4-kernel-test-b200 (code map)
  • deepseek-v4-kernel-test-h100 (code map)
  • distributed-comm-ops (code map)
  • distributed-compile-comm-4-gpus (code map)
  • distributed-compile-rpc-tests-2-gpus (code map)
  • distributed-compile-unit-tests-2xh100 (code map)
  • distributed-dp-tests-2-gpus (code map)
  • distributed-dp-tests-4-gpus (code map)
  • distributed-flashinfer-nixlconnector-pd-accuracy-4-gpus (code map)
  • distributed-model-tests-2-gpus ×3 (code map)
  • distributed-mooncakeconnector-pd-accuracy-4-gpus (code map)
  • distributed-nixlconnector-pd-accuracy-4-gpus (code map)
  • distributed-tests-8xh100 (code map)
  • distributed-torchrun-examples-4-gpus (code map)
  • distributed-torchrun-shutdown-tests-2-gpus (code map)
  • docker-build-metadata (code map)
  • dp-ep-distributed-nixlconnector-pd-accuracy-tests-4-gpus (code map)
  • e2e-core-1-gpu (code map)
  • e2e-core-large-memory (code map)
  • e2e-scheduling-1-gpu (code map)
  • e2e-scheduling-accuracy-1-gpu (code map)
  • engine (code map)
  • engine-1-gpu (code map)
  • entrypoints-integration-api-server ×4 (code map)
  • entrypoints-integration-api-server-generate (code map)
  • entrypoints-integration-llm (code map)
  • entrypoints-integration-multimodal (code map)
  • entrypoints-integration-pooling (code map)
  • entrypoints-integration-responses-api (code map)
  • entrypoints-integration-speech_to_text (code map)
  • entrypoints-unit-tests (code map)
  • eplb-algorithm (code map)
  • eplb-execution (code map)
  • examples (code map)
  • extract-hidden-states-integration (code map)
  • extract-hidden-states-integration-2-gpus (code map)
  • fault-tolerance-e2e-2xh100 (code map)
  • fusion-and-compile-unit-tests-2xb200 (code map)
  • fusion-e2e-config-sweep-h100 (code map)
  • fusion-e2e-quick-h100 (code map)
  • fusion-e2e-tp2-ar-rms-config-sweep-h100 (code map)
  • fusion-e2e-tp2-b200 (code map)
  • fusion-e2e-tp2-quick-h100 (code map)
  • gemm-rs-ar-2xb200 (code map)
  • glm5next-unit-tests (code map)
  • hybrid-ssm-nixlconnector-pd-accuracy-tests-4-gpus (code map)
  • hybrid-ssm-nixlconnector-pd-prefix-cache-2-gpus (code map)
  • inkling-unit-tests-b200 (code map)
  • jit-monitor-no-runtime-jit (code map)
  • kernels-attention-diffkv-test-h100 (code map)
  • kernels-attention-test ×7 (code map)
  • kernels-b200 ×3 (code map)
  • kernels-core-operation-test ×3 (code map)
  • kernels-fla-ops-test-b200 (code map)
  • kernels-flashmla-test-h100 (code map)
  • kernels-fp4-moe-test-b200 (code map)
  • kernels-fusedmoe-layer-test-2-b200s (code map)
  • kernels-fusedmoe-layer-test-2-h100s (code map)
  • kernels-helion-test ×5 (code map)
  • kernels-mamba-test (code map)
  • kernels-mhc-test-b200 (code map)
  • kernels-minimax-reduce-rms-test-2-gpus (code map)
  • kernels-moe-test ×5 (code map)
  • kernels-quantization-test ×6 (code map)
  • kernels-root-misc-test-b200 (code map)
  • kimi-k3-unit-tests-b200 (code map)
  • kv-offload-large (code map)
  • kv-offload-medium (code map)
  • kv-offload-small (code map)
  • language-models-tests-extra-standard ×2 (code map)
  • language-models-tests-granite-l4-compatibility (code map)
  • language-models-tests-hybrid ×2 (code map)
  • language-models-tests-standard (code map)
  • lm-eval-dspark-watermark-2xh100 (code map)
  • lm-eval-small-models (code map)
  • lm-eval-turboquant-k3v4nc (code map)
  • lm-eval-turboquant-k8v4 (code map)
  • lm-eval-turboquant-t3nc (code map)
  • lm-eval-turboquant-t4nc (code map)
  • lm-eval-watermarking (code map)
  • lora ×4 (code map)
  • lora-tp-distributed ×4 (code map)
  • metrics-tracing-2-gpus (code map)
  • model-executor (code map)
  • mooncake-ec-tcp-e2e-2-gpus (code map)
  • mrcr-eval-small-models (code map)
  • multi-modal-accuracy-eval-small-models (code map)
  • multi-modal-models-standard-1-qwen2 (code map)
  • multi-modal-models-standard-2-qwen3-gemma (code map)
  • multi-modal-models-standard-3-llava-qwen2-vl (code map)
  • multi-modal-models-standard-4-other-whisper (code map)
  • multi-modal-processor ×4 (code map)
  • multiconnector-nixl-offloading-pd-accuracy-2-gpus (code map)
  • multiconnector-nixl-offloading-pd-edge-cases-2-gpus (code map)
  • nixlconnector-pd-edge-cases-2-gpus (code map)
  • nixlconnector-pd-spec-decode-acceptance-2-gpus (code map)
  • openai-api-correctness (code map)
  • pipeline-context-parallelism-4-gpus (code map)
  • platform-tests (code map)
  • plugin-tests-2-gpus (code map)
  • push-nixlconnector-pp-prefill-pd-accuracy-4-gpus (code map)
  • pytorch-compilation-dynamic-shapes (code map)
  • pytorch-compilation-passes-unit-tests (code map)
  • pytorch-compilation-unit-tests (code map)
  • pytorch-compilation-unit-tests-h100 (code map)
  • pytorch-fullgraph-cudagraph-l4-compatibility (code map)
  • pytorch-fullgraph-test (code map)
  • pytorch-nightly-dependency-override-check (code map)
  • quantization ×4 (code map)
  • quantized-fusions (code map)
  • quantized-models-test (code map)
  • quantized-moe-test-b200 (code map)
  • qwen4-exp-unit-tests (code map)
  • ray-dependency-compatibility-check (code map)
  • rayexecutorv2-4-gpus (code map)
  • regression (code map)
  • rl-entrypoints-tests (code map)
  • samplers-multimodal-beam-search (code map)
  • samplers-test (code map)
  • scale-out-ec-e2e-2-gpus (code map)
  • sharded-rdt-weight-transfer (code map)
  • spec-decode-draft-model ×4 (code map)
  • spec-decode-eagle-1-deepseek-qwen (code map)
  • spec-decode-eagle-2-llama3-qwen-vl-other (code map)
  • spec-decode-mtp-deepseek-mimo (code map)
  • spec-decode-mtp-gemma4 (code map)
  • spec-decode-mtp-qwen3-5 (code map)
  • spec-decode-ngram-suffix (code map)
  • spec-decode-speculators (code map)
  • torch-stable-abi-audit (code map)
  • v1-attention-b200 ×2 (code map)
  • v1-attention-h100-mi300 ×2 (code map)
  • v1-core (code map)
  • v1-executor-worker (code map)
  • v1-kv-connectors ×4 (code map)
  • v1-kv-offload (code map)
  • v1-logits-oracle (code map)
  • v1-metrics-lmeval (code map)
  • v1-sample (code map)
  • v1-spec-decode (code map)
  • vllm-ir-tests (code map)

28 changed files · base 802feb6770 · head 1bc6e072b0 · Python record: build 93039 at 1e5d0ea888 · kernel record: table 74f4404 (build 94125), map 74f4404 · not counted: 11 build steps, 5 A100 steps the generator no longer emits, 139 optional steps the selector would also run

xinnywinne and others added 6 commits October 12, 2026 21:08
Assisted-by: OpenAI Codex

Signed-off-by: wxin <wxin@nvidia.com>
Assisted-by: OpenAI Codex <noreply@openai.com>
Signed-off-by: wxin <wxin@nvidia.com>
Assisted-by: OpenAI Codex <noreply@openai.com>
Signed-off-by: wxin <wxin@nvidia.com>
Replace the hand-written stream metrics serializer with a
`StreamPerRequestMetrics` type using `skip_serializing_none`, converted
from `PerRequestMetrics` by exhaustive destructuring so new fields cannot
be missed. Pass metrics into `usage_chunk` directly, and inline the
`per_request_metrics` helper as `enabled.then(|| ...)` at call sites.
Also tidy import grouping and method order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Frontend text decoding can terminate a request after matching a stop string before the engine emits a terminal output. Carry the current request timestamp snapshot on every generated output so that locally terminated requests can report valid metrics without panicking.

Assisted-by: OpenAI Codex <noreply@openai.com>
Signed-off-by: wxin <wxin@nvidia.com>
@xinnywinne
xinnywinne force-pushed the feat/rust-per-request-metrics branch from 40b65b1 to 9b53d5d Compare October 12, 2026 21:19
@mergify mergify Bot removed the needs-rebase label Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

The reported CI failures were related. The Rust decoder can complete a request locally when it matches a stop string, before the engine sends a terminal output; the terminal-only timestamp invariant therefore caused the panic. I rebased onto current main, fixed the invariant in 9b53d5d, added the nonterminal-engine-output regression case, and validated non-streaming and streaming stop-string requests with metrics on an A100. The PR description now includes the root cause and current validation.

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #94320 for commit 9b53d5d2632d.

@njhill
njhill merged commit 1bc6e07 into vllm-project:main Oct 12, 2026
35 checks passed
AndreasKaratzas pushed a commit to AndreasKaratzas/vllm that referenced this pull request Oct 16, 2026
vllm-project#59314)

Signed-off-by: wxin <wxin@nvidia.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Co-authored-by: Bugen Zhao <i@bugenzhao.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Andreas Karatzas <AndreasKaratzas@users.noreply.github.com>
michael-gpu pushed a commit to practical-inference/vllm-ampere-extended that referenced this pull request Oct 20, 2026
vllm-project#59314)

Signed-off-by: wxin <wxin@nvidia.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Co-authored-by: Bugen Zhao <i@bugenzhao.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gpt-oss Related to GPT-OSS models ready ONLY add when PR is ready to merge/full CI is needed rust

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants