fix(trtllm): handle rc22 disaggregated request changes - #12203
Merged
Conversation
Signed-off-by: krishung5 <krish@nvidia.com>
|
🎯 Code Coverage (details) 🔗 Commit SHA: 6314461 | Docs | Datadog PR Page | Give us feedback! |
Signed-off-by: krishung5 <krish@nvidia.com>
krishung5
force-pushed
the
krish/fix-terminal-prefill-response
branch
from
July 27, 2026 16:58
9122e29 to
2e1537d
Compare
3 tasks
Signed-off-by: krishung5 <krish@nvidia.com>
krishung5
marked this pull request as ready for review
July 27, 2026 17:31
Contributor
WalkthroughThe change adds TRT-LLM request ID compatibility across API versions and updates prefill routing to classify terminal responses, validate handoff metadata, and bypass decode routing for terminal outputs. ChangesDisaggregation request ID compatibility
Terminal prefill routing
Estimated code review effort: 4 (Complex) | ~45 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/llm/src/kv_router/prefill_router/admission.rs`:
- Around line 113-128: Move the terminal-output classification around
first_output ahead of the non-bootstrap stream drain in the prefill admission
flow. When the first frame is terminal, return PrefillCompletion::Terminal
immediately while background-draining remaining frames using the existing
bootstrap behavior, so delayed frames and trailing Annotated::from_error values
cannot alter the result. Add a regression test covering a terminal first frame
followed by a trailing error.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b3c53733-32d1-445e-ae9a-59ebed423729
📒 Files selected for processing (5)
components/src/dynamo/trtllm/request_handlers/handler_base.pycomponents/src/dynamo/trtllm/tests/test_trtllm_disagg_request_id.pycomponents/src/dynamo/trtllm/utils/disagg_utils.pylib/llm/src/kv_router/prefill_router/admission.rslib/llm/src/kv_router/prefill_router/mod.rs
nv-yna
approved these changes
Jul 27, 2026
Signed-off-by: krishung5 <krish@nvidia.com>
tanmayv25
approved these changes
Jul 27, 2026
krishung5
enabled auto-merge (squash)
July 27, 2026 23:57
jthomson04
approved these changes
Jul 28, 2026
This was referenced Jul 30, 2026
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.
Overview:
This PR fixes two compatibility gaps encountered when running Dynamo
disaggregated serving with TensorRT-LLM rc22:
machine_idto a(node_id, process_id)pair. Passing the existing Dynamomachine ID as
node_idcan exceed the rc22 8-bit range.sampling EOS or a stop token. That terminal response legitimately has no
KV-cache handoff IDs, but Dynamo currently dispatches GEN anyway and
eventually fails with
ctx_request_id is None.Example error:
Closes DIS-2530
Details:
Request-ID compatibility
divmod(machine_id, 64)into the new 8-bit node ID and 6-bit process IDfields.
across all 1,021 Dynamo machine-ID slots.
Terminal prefill responses
handoff.
FinishReason::Lengthand an absent finish reason,which corresponds to
not_finished.without dispatching GEN.
response.
responses.
The terminal behavior matches the native TensorRT-LLM disaggregated
orchestrator fix for NVBug 6245861.
Validation:
cargo fmt --all -- --checkPROTOC=/home/krish/.local/protoc/bin/protoc cargo test -p dynamo-llm kv_router::prefill_router --lib— 20 passed.function signatures.
frontend requests across 13 post-fix runs, zero
ctx_request_id is Noneassertions, and one observed terminal CTX response returned successfully
without a GEN dispatch.
cargo clippywas not available in the local Rust toolchain; CI should run it.Where should the reviewer start?
components/src/dynamo/trtllm/utils/disagg_utils.py: cross-versionrequest-ID adapter.
lib/llm/src/kv_router/prefill_router/admission.rs: terminalclassification.
lib/llm/src/kv_router/prefill_router/mod.rs: direct terminal response pathbefore decode routing.
Related Issues
🚫 This PR is NOT linked to an issue:
Summary by CodeRabbit
Bug Fixes
Tests