Skip to content

[https://nvbugs/6156492][fix] Fix disaggregated usage propagation#14177

Merged
reasonsolo merged 1 commit into
NVIDIA:mainfrom
reasonsolo:bug6156492
May 22, 2026
Merged

[https://nvbugs/6156492][fix] Fix disaggregated usage propagation#14177
reasonsolo merged 1 commit into
NVIDIA:mainfrom
reasonsolo:bug6156492

Conversation

@reasonsolo

@reasonsolo reasonsolo commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added context response usage tracking and propagation across disaggregated serving phases.
    • Token usage now includes cached token accounting alongside prompt and completion tokens.
    • Context usage information is now carried through to generation response outputs.
    • Supports both streaming and non-streaming chat and completion endpoints.
  • Tests

    • Updated existing tests to verify token usage data structure and propagation.
    • Added tests validating usage rewriting for generation postprocessors.

Review Change Stack

Description

Test Coverage

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR extends disaggregated serving to propagate exact token usage accounting from the context phase to generation phase. It introduces ctx_response_usage as an optional field through disaggregated params, allocates auxiliary buffer storage for usage data, converts between LLM dict and protocol UsageInfo formats, and rewrites postprocessed response usage fields accordingly.

Changes

Context Response Usage Propagation Through Disaggregated Serving

Layer / File(s) Summary
Auxiliary buffer data model and APIs
tensorrt_llm/_torch/disaggregation/native/auxiliary.py
AuxBufferBase gains abstract get_slot_data(slot) method. AuxBuffer allocates _usage_buffer tensor for prompt/cached tokens per slot, extends metadata with RDMA-relevant pointer/size, and fills slots by extracting usage from request.py_disaggregated_params.ctx_response_usage. Implements get_slot_data returning (first_gen_tokens, draft_tokens, usage_dict).
LLM-side DisaggregatedParams
tensorrt_llm/disaggregated_params.py
Adds optional ctx_response_usage: Optional[Dict[str, Any]] field and docstring to carry context response usage payload for exact usage accounting between context and generation phases.
Disaggregation transfer and service integration
tensorrt_llm/_torch/disaggregation/native/transfer.py, tensorrt_llm/serve/openai_disagg_service.py
RxSession.unpack_aux() switches to get_slot_data() and propagates returned usage into request disaggregated params. OpenAIDisaggregatedService refactors usage computation and rewriting to delegate to centralized helper functions, and attaches context usage to generation request disaggregated params when building follow-up requests.
OpenAI protocol layer
tensorrt_llm/serve/openai_protocol.py
Protocol DisaggregatedParams gains ctx_response_usage: Optional[UsageInfo] field. to_disaggregated_params extracts and coerces usage from LLM dict to UsageInfo. to_llm_disaggregated_params serializes usage back to dict. New helpers extract token counts and rewrite response usage objects.
Postprocess handlers
tensorrt_llm/serve/postprocess_handlers.py
ChatPostprocArgs, CompletionPostprocArgs, and ChatCompletionPostprocArgs gain ctx_response_usage field extracted from request disaggregated params. Chat and completion postprocessors compute context usage and rewrite UsageInfo for all streamed chunks and final responses via rewrite helpers. Harmony-based postprocessors similarly rewrite usage and override prompt/cached token values when present.
Test coverage
tests/unittest/disaggregated/region/test_aux.py, tests/unittest/disaggregated/test_disaggregated_params.py, tests/unittest/disaggregated/test_openai_disagg_service.py
Auxiliary buffer tests expect four metadata arrays and validate get_slot_data round-trip. Protocol conversion tests validate round-trip of ctx_response_usage with nested prompt_tokens_details.cached_tokens. Service tests verify generation request usage in context-first mode and postprocessor usage rewriting in completion and chat responses.

🎯 4 (Complex) | ⏱️ ~75 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning PR description is entirely a template with no substantive content, missing all required sections including explanation of the issue, solution, and test coverage. Complete the Description section explaining the issue and solution. List relevant test cases in the Test Coverage section. Fill in or verify the PR Checklist items.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the main change: fixing disaggregated usage propagation across the codebase, which is reflected in all modified files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
tensorrt_llm/disaggregated_params.py (1)

1-1: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add the required NVIDIA copyright/license header to this modified source file.

This modified file is missing the required NVIDIA Apache-2.0 copyright header.

As per coding guidelines "All TensorRT-LLM source files must contain an NVIDIA copyright header with year of latest modification, using the Apache 2.0 license text".

🤖 Prompt for 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.

In `@tensorrt_llm/disaggregated_params.py` at line 1, This file is missing the
required NVIDIA Apache-2.0 copyright header; add the standard NVIDIA Apache-2.0
header block (with the year of latest modification) at the very top of the
source before the first import (the line "from dataclasses import dataclass"),
ensuring it includes the copyright statement and the Apache-2.0 license
text/SPDX identifier exactly as used across other TensorRT-LLM source files.
tensorrt_llm/serve/postprocess_handlers.py (1)

1-1: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add the required NVIDIA copyright/license header to this modified source file.

This modified source file lacks the required NVIDIA Apache-2.0 header.

As per coding guidelines "All TensorRT-LLM source files must contain an NVIDIA copyright header with year of latest modification, using the Apache 2.0 license text".

🤖 Prompt for 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.

In `@tensorrt_llm/serve/postprocess_handlers.py` at line 1, Add the required
NVIDIA Apache-2.0 copyright header at the top of this modified source file
(tensorrt_llm.serve.postprocess_handlers.py) so the file contains the standard
NVIDIA header with the year of latest modification and the Apache-2.0 license
text; place it above the first import (the line starting with "from dataclasses
import dataclass, field") and ensure the header matches the project's canonical
NVIDIA/Apache-2.0 header format exactly.
tensorrt_llm/serve/openai_protocol.py (1)

1-2: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add the required NVIDIA copyright/license header to this modified source file.

This modified source file is missing the mandatory NVIDIA Apache-2.0 header.

As per coding guidelines "All TensorRT-LLM source files must contain an NVIDIA copyright header with year of latest modification, using the Apache 2.0 license text".

🤖 Prompt for 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.

In `@tensorrt_llm/serve/openai_protocol.py` around lines 1 - 2, Add the required
NVIDIA Apache-2.0 copyright/license header to the top of openai_protocol.py:
insert the official NVIDIA Apache-2.0 header block with the year of latest
modification and the Apache-2.0 license notice above the existing file comments
(before the "Adapted from" lines) so the file includes the mandatory NVIDIA
copyright and license text.
tensorrt_llm/_torch/disaggregation/native/transfer.py (1)

1-1: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add the required NVIDIA copyright/license header to this modified source file.

This modified source file is missing the mandated NVIDIA Apache-2.0 header.

As per coding guidelines "All TensorRT-LLM source files must contain an NVIDIA copyright header with year of latest modification, using the Apache 2.0 license text".

🤖 Prompt for 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.

In `@tensorrt_llm/_torch/disaggregation/native/transfer.py` at line 1, This file
(module tensorrt_llm._torch.disaggregation.native.transfer, file transfer.py) is
missing the required NVIDIA Apache-2.0 copyright header; add the standard NVIDIA
copyright/license block at the top of transfer.py containing the NVIDIA
copyright line with the year of latest modification and the full Apache License,
Version 2.0 notice (or the project's canonical header template), ensuring it
appears before any imports (before "from __future__ import annotations").
tensorrt_llm/_torch/disaggregation/native/auxiliary.py (1)

1-1: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add the required NVIDIA copyright/license header to this modified source file.

This file is modified but does not include the required NVIDIA Apache-2.0 header block.

As per coding guidelines "All TensorRT-LLM source files must contain an NVIDIA copyright header with year of latest modification, using the Apache 2.0 license text".

🤖 Prompt for 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.

In `@tensorrt_llm/_torch/disaggregation/native/auxiliary.py` at line 1, The file
is missing the required NVIDIA Apache-2.0 copyright header; add the standard
NVIDIA copyright/license header block (with the year of latest modification) at
the very top of the file above the existing import(s) (i.e., before the line
containing "from abc import ABC, abstractmethod"), ensuring it matches the
project's required Apache-2.0 template and includes the NVIDIA copyright notice
and license text.
🧹 Nitpick comments (4)
tests/unittest/disaggregated/test_openai_disagg_service.py (2)

303-392: QA list update not needed for this PR scope.

These changes are unit-test-only under tests/unittest/..., so QA integration test-list updates are unnecessary in this PR.

As per coding guidelines "If the PR only touches unittest/ or narrow unit scope, say explicitly whether QA list updates are unnecessary or optional."

🤖 Prompt for 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.

In `@tests/unittest/disaggregated/test_openai_disagg_service.py` around lines 303
- 392, This PR only modifies unit tests in
tests/unittest/disaggregated/test_openai_disagg_service.py (e.g.,
test_generation_postprocessor_rewrites_usage_from_disaggregated_params and
test_generation_chat_postprocessor_rewrites_usage_from_output_disaggregated_params),
so update the PR description or checklist to state explicitly that QA
integration list updates are unnecessary for this change; mention the file and
test-only scope and that no QA list modifications are required.

310-329: ⚡ Quick win

Isolate usage source in this completion postprocessor test.

On Line 313 and Line 326, ctx_response_usage is populated in both request and output disaggregated params. That can mask regressions because either path can satisfy the same assertions. Keep one source per test (and add a separate test for the other source/precedence).

♻️ Suggested adjustment to isolate this test path
     request = CompletionRequest(
         model="test-model",
         prompt=[1, 2, 3],
         disaggregated_params=DisaggregatedParams(
             request_type="generation_only",
-            ctx_response_usage=ctx_usage,
         ),
     )

As per coding guidelines "Coverage expectations: Assess whether new/changed tests cover happy path, important edge cases, and failure modes relevant to the feature or fix."

🤖 Prompt for 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.

In `@tests/unittest/disaggregated/test_openai_disagg_service.py` around lines 310
- 329, The test currently sets ctx_response_usage in both the request
DisaggregatedParams and the output LlmDisaggregatedParams, which hides
regressions; modify the test to keep only one source of usage data (e.g., keep
ctx_response_usage on the request side and remove it from the output
LlmDisaggregatedParams) so the CompletionPostprocArgs.from_request /
postprocessor behavior is exercised deterministically; update the
SimpleNamespace outputs block to omit ctx_response_usage from
LlmDisaggregatedParams (or alternatively remove it from the request and keep it
in the output) and add a separate test to cover the other precedence path if
needed.
tests/unittest/disaggregated/region/test_aux.py (2)

90-118: ⚡ Quick win

Add a test for ctx_response_usage precedence in _get_ctx_usage.

This test only exercises the fallback branch (prompt_len/cached_tokens). Add a case where py_disaggregated_params.ctx_response_usage is present to lock precedence behavior.

As per coding guidelines "Assess whether new/changed tests cover happy path, important edge cases, and failure modes relevant to the feature or fix".

🤖 Prompt for 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.

In `@tests/unittest/disaggregated/region/test_aux.py` around lines 90 - 118, Add a
new assertion path to the test_fill_slot_get_slot_tokens_round_trip that
supplies py_disaggregated_params with a ctx_response_usage dict on the
mock_request to ensure _get_ctx_usage prefers ctx_response_usage over
prompt_len/cached_tokens; specifically, set mock_request.py_disaggregated_params
= SimpleNamespace(ctx_response_usage={"prompt_tokens": 5, "completion_tokens":
2, "total_tokens": 7}) (or equivalent) before calling buf.fill_slot(slot.id,
mock_request), then call buf.get_slot_data(slot.id) and assert the returned
usage equals the provided ctx_response_usage structure (and that first/draft
tokens still match) so the precedence behavior is tested for AuxBuffer.fill_slot
/ AuxBuffer._get_ctx_usage / AuxBuffer.get_slot_data.

1-129: QA test-list updates look unnecessary here since this PR touches unit-test scope and no tests/integration/defs/ scheduling surface.

As per coding guidelines "If the PR only touches unittest/ or narrow unit scope, say explicitly whether QA list updates are unnecessary or optional".

🤖 Prompt for 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.

In `@tests/unittest/disaggregated/region/test_aux.py` around lines 1 - 129, Add an
explicit note in the PR description saying QA test-list updates are unnecessary
(or optional) because this change only touches unit-test scope — specifically
the test module containing test_aux_buffer_meta_construction,
test_aux_buffer_alloc_and_free_slot, test_fill_slot_get_slot_tokens_round_trip,
and related tests — so QA scheduling changes under tests/integration are not
required.
🤖 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.

Outside diff comments:
In `@tensorrt_llm/_torch/disaggregation/native/auxiliary.py`:
- Line 1: The file is missing the required NVIDIA Apache-2.0 copyright header;
add the standard NVIDIA copyright/license header block (with the year of latest
modification) at the very top of the file above the existing import(s) (i.e.,
before the line containing "from abc import ABC, abstractmethod"), ensuring it
matches the project's required Apache-2.0 template and includes the NVIDIA
copyright notice and license text.

In `@tensorrt_llm/_torch/disaggregation/native/transfer.py`:
- Line 1: This file (module tensorrt_llm._torch.disaggregation.native.transfer,
file transfer.py) is missing the required NVIDIA Apache-2.0 copyright header;
add the standard NVIDIA copyright/license block at the top of transfer.py
containing the NVIDIA copyright line with the year of latest modification and
the full Apache License, Version 2.0 notice (or the project's canonical header
template), ensuring it appears before any imports (before "from __future__
import annotations").

In `@tensorrt_llm/disaggregated_params.py`:
- Line 1: This file is missing the required NVIDIA Apache-2.0 copyright header;
add the standard NVIDIA Apache-2.0 header block (with the year of latest
modification) at the very top of the source before the first import (the line
"from dataclasses import dataclass"), ensuring it includes the copyright
statement and the Apache-2.0 license text/SPDX identifier exactly as used across
other TensorRT-LLM source files.

In `@tensorrt_llm/serve/openai_protocol.py`:
- Around line 1-2: Add the required NVIDIA Apache-2.0 copyright/license header
to the top of openai_protocol.py: insert the official NVIDIA Apache-2.0 header
block with the year of latest modification and the Apache-2.0 license notice
above the existing file comments (before the "Adapted from" lines) so the file
includes the mandatory NVIDIA copyright and license text.

In `@tensorrt_llm/serve/postprocess_handlers.py`:
- Line 1: Add the required NVIDIA Apache-2.0 copyright header at the top of this
modified source file (tensorrt_llm.serve.postprocess_handlers.py) so the file
contains the standard NVIDIA header with the year of latest modification and the
Apache-2.0 license text; place it above the first import (the line starting with
"from dataclasses import dataclass, field") and ensure the header matches the
project's canonical NVIDIA/Apache-2.0 header format exactly.

---

Nitpick comments:
In `@tests/unittest/disaggregated/region/test_aux.py`:
- Around line 90-118: Add a new assertion path to the
test_fill_slot_get_slot_tokens_round_trip that supplies py_disaggregated_params
with a ctx_response_usage dict on the mock_request to ensure _get_ctx_usage
prefers ctx_response_usage over prompt_len/cached_tokens; specifically, set
mock_request.py_disaggregated_params =
SimpleNamespace(ctx_response_usage={"prompt_tokens": 5, "completion_tokens": 2,
"total_tokens": 7}) (or equivalent) before calling buf.fill_slot(slot.id,
mock_request), then call buf.get_slot_data(slot.id) and assert the returned
usage equals the provided ctx_response_usage structure (and that first/draft
tokens still match) so the precedence behavior is tested for AuxBuffer.fill_slot
/ AuxBuffer._get_ctx_usage / AuxBuffer.get_slot_data.
- Around line 1-129: Add an explicit note in the PR description saying QA
test-list updates are unnecessary (or optional) because this change only touches
unit-test scope — specifically the test module containing
test_aux_buffer_meta_construction, test_aux_buffer_alloc_and_free_slot,
test_fill_slot_get_slot_tokens_round_trip, and related tests — so QA scheduling
changes under tests/integration are not required.

In `@tests/unittest/disaggregated/test_openai_disagg_service.py`:
- Around line 303-392: This PR only modifies unit tests in
tests/unittest/disaggregated/test_openai_disagg_service.py (e.g.,
test_generation_postprocessor_rewrites_usage_from_disaggregated_params and
test_generation_chat_postprocessor_rewrites_usage_from_output_disaggregated_params),
so update the PR description or checklist to state explicitly that QA
integration list updates are unnecessary for this change; mention the file and
test-only scope and that no QA list modifications are required.
- Around line 310-329: The test currently sets ctx_response_usage in both the
request DisaggregatedParams and the output LlmDisaggregatedParams, which hides
regressions; modify the test to keep only one source of usage data (e.g., keep
ctx_response_usage on the request side and remove it from the output
LlmDisaggregatedParams) so the CompletionPostprocArgs.from_request /
postprocessor behavior is exercised deterministically; update the
SimpleNamespace outputs block to omit ctx_response_usage from
LlmDisaggregatedParams (or alternatively remove it from the request and keep it
in the output) and add a separate test to cover the other precedence path if
needed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0b295800-b3d7-4c4e-bacf-f9dd5c9c21ad

📥 Commits

Reviewing files that changed from the base of the PR and between ae8956f and 130e936.

📒 Files selected for processing (9)
  • tensorrt_llm/_torch/disaggregation/native/auxiliary.py
  • tensorrt_llm/_torch/disaggregation/native/transfer.py
  • tensorrt_llm/disaggregated_params.py
  • tensorrt_llm/serve/openai_disagg_service.py
  • tensorrt_llm/serve/openai_protocol.py
  • tensorrt_llm/serve/postprocess_handlers.py
  • tests/unittest/disaggregated/region/test_aux.py
  • tests/unittest/disaggregated/test_disaggregated_params.py
  • tests/unittest/disaggregated/test_openai_disagg_service.py

@reasonsolo reasonsolo changed the title [https://nvbugs/6156492][Fix] Fix disaggregated usage propagation [https://nvbugs/6156492][fix] Fix disaggregated usage propagation May 15, 2026
@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #48569 [ run ] triggered by Bot. Commit: 130e936 Link to invocation

@reasonsolo
reasonsolo requested review from a team as code owners May 15, 2026 09:04
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #48569 [ run ] completed with state FAILURE. Commit: 130e936
/LLM/main/L0_MergeRequest_PR pipeline #38356 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #48666 [ run ] triggered by Bot. Commit: aa902a6 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #48666 [ run ] completed with state SUCCESS. Commit: aa902a6
/LLM/main/L0_MergeRequest_PR pipeline #38446 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #48796 [ run ] triggered by Bot. Commit: aa902a6 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #48796 [ run ] completed with state SUCCESS. Commit: aa902a6
/LLM/main/L0_MergeRequest_PR pipeline #38559 completed with status: 'SUCCESS'

CI Report

Link to invocation

@lishicheng1996-nv

Copy link
Copy Markdown
Collaborator

It works great!

@reasonsolo
reasonsolo requested a review from Shixiaowei02 May 18, 2026 05:35
Comment thread tests/integration/test_lists/qa/llm_function_rtx6k.txt Outdated
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49706 [ run ] triggered by Bot. Commit: f738231 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49706 [ run ] completed with state SUCCESS. Commit: f738231
/LLM/main/L0_MergeRequest_PR pipeline #39312 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com>
@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49790 [ run ] triggered by Bot. Commit: a7b1025 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49790 [ run ] completed with state SUCCESS. Commit: a7b1025
/LLM/main/L0_MergeRequest_PR pipeline #39381 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49883 [ run ] triggered by Bot. Commit: a7b1025 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49883 [ run ] completed with state SUCCESS. Commit: a7b1025
/LLM/main/L0_MergeRequest_PR pipeline #39462 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49903 [ run ] triggered by Bot. Commit: a7b1025 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49903 [ run ] completed with state SUCCESS. Commit: a7b1025
/LLM/main/L0_MergeRequest_PR pipeline #39482 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49915 [ run ] triggered by Bot. Commit: a7b1025 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49915 [ run ] completed with state SUCCESS. Commit: a7b1025
/LLM/main/L0_MergeRequest_PR pipeline #39494 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49932 [ run ] triggered by Bot. Commit: a7b1025 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49932 [ run ] completed with state SUCCESS. Commit: a7b1025
/LLM/main/L0_MergeRequest_PR pipeline #39507 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49940 [ run ] triggered by Bot. Commit: a7b1025 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #49940 [ run ] completed with state SUCCESS. Commit: a7b1025
/LLM/main/L0_MergeRequest_PR pipeline #39513 completed with status: 'SUCCESS'

CI Report

Link to invocation

@reasonsolo
reasonsolo merged commit ad38289 into NVIDIA:main May 22, 2026
7 checks passed
KleinBlueC pushed a commit to KleinBlueC/TensorRT-LLM that referenced this pull request May 26, 2026
…IDIA#14177)

Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com>
bmarimuthu-nv pushed a commit to nv-auto-deploy/TensorRT-LLM that referenced this pull request May 28, 2026
…IDIA#14177)

Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com>
lancelly added a commit to lfr-0531/TensorRT-LLM that referenced this pull request Jun 26, 2026
…VIDIA#15042

NVIDIA#15042 ("skip per-chunk JSON parse on streaming usage rewrite") was a 5-line
optimization on feat/deepseek_v4, layered on the method-based usage-rewrite
machinery introduced by NVIDIA#13620. When this PR carved NVIDIA#15042 onto main, that
machinery did not exist there: main's NVIDIA#14177 ("Fix disaggregated usage
propagation") had refactored NVIDIA#13620 into postprocess_handlers
(rewrite_usage_info_from_ctx, operating on parsed chunk objects). The carve
folded the obsolete pre-refactor machinery back in to make the patch apply.

The result is dead code: _rewrite_disagg_usage (the chain root) has no caller,
so the whole _ctx_usage_for_client / _rewrite_usage_* /
_rewrite_streaming_usage_from_ctx subtree is unreachable, and NVIDIA#15042's
json.loads-skip optimization sits inside it (a no-op). main already rewrites
disagg usage via postprocess_handlers and relays streaming bytes untouched, so
the optimized per-chunk-parse path no longer exists.

Remove the dead methods and the now-orphaned imports (json, AsyncIterator,
PromptTokensDetails). No behavior change: the live usage path is unaffected.

Signed-off-by: Lance Liao <108499334+lancelly@users.noreply.github.com>
Shixiaowei02 pushed a commit to lfr-0531/TensorRT-LLM that referenced this pull request Jun 29, 2026
…VIDIA#15042

NVIDIA#15042 ("skip per-chunk JSON parse on streaming usage rewrite") was a 5-line
optimization on feat/deepseek_v4, layered on the method-based usage-rewrite
machinery introduced by NVIDIA#13620. When this PR carved NVIDIA#15042 onto main, that
machinery did not exist there: main's NVIDIA#14177 ("Fix disaggregated usage
propagation") had refactored NVIDIA#13620 into postprocess_handlers
(rewrite_usage_info_from_ctx, operating on parsed chunk objects). The carve
folded the obsolete pre-refactor machinery back in to make the patch apply.

The result is dead code: _rewrite_disagg_usage (the chain root) has no caller,
so the whole _ctx_usage_for_client / _rewrite_usage_* /
_rewrite_streaming_usage_from_ctx subtree is unreachable, and NVIDIA#15042's
json.loads-skip optimization sits inside it (a no-op). main already rewrites
disagg usage via postprocess_handlers and relays streaming bytes untouched, so
the optimized per-chunk-parse path no longer exists.

Remove the dead methods and the now-orphaned imports (json, AsyncIterator,
PromptTokensDetails). No behavior change: the live usage path is unaffected.

Signed-off-by: Lance Liao <108499334+lancelly@users.noreply.github.com>
lancelly added a commit to lfr-0531/TensorRT-LLM that referenced this pull request Jun 29, 2026
…VIDIA#15042

NVIDIA#15042 ("skip per-chunk JSON parse on streaming usage rewrite") was a 5-line
optimization on feat/deepseek_v4, layered on the method-based usage-rewrite
machinery introduced by NVIDIA#13620. When this PR carved NVIDIA#15042 onto main, that
machinery did not exist there: main's NVIDIA#14177 ("Fix disaggregated usage
propagation") had refactored NVIDIA#13620 into postprocess_handlers
(rewrite_usage_info_from_ctx, operating on parsed chunk objects). The carve
folded the obsolete pre-refactor machinery back in to make the patch apply.

The result is dead code: _rewrite_disagg_usage (the chain root) has no caller,
so the whole _ctx_usage_for_client / _rewrite_usage_* /
_rewrite_streaming_usage_from_ctx subtree is unreachable, and NVIDIA#15042's
json.loads-skip optimization sits inside it (a no-op). main already rewrites
disagg usage via postprocess_handlers and relays streaming bytes untouched, so
the optimized per-chunk-parse path no longer exists.

Remove the dead methods and the now-orphaned imports (json, AsyncIterator,
PromptTokensDetails). No behavior change: the live usage path is unaffected.

Signed-off-by: Lance Liao <108499334+lancelly@users.noreply.github.com>
Shixiaowei02 pushed a commit to lfr-0531/TensorRT-LLM that referenced this pull request Jun 30, 2026
…VIDIA#15042

NVIDIA#15042 ("skip per-chunk JSON parse on streaming usage rewrite") was a 5-line
optimization on feat/deepseek_v4, layered on the method-based usage-rewrite
machinery introduced by NVIDIA#13620. When this PR carved NVIDIA#15042 onto main, that
machinery did not exist there: main's NVIDIA#14177 ("Fix disaggregated usage
propagation") had refactored NVIDIA#13620 into postprocess_handlers
(rewrite_usage_info_from_ctx, operating on parsed chunk objects). The carve
folded the obsolete pre-refactor machinery back in to make the patch apply.

The result is dead code: _rewrite_disagg_usage (the chain root) has no caller,
so the whole _ctx_usage_for_client / _rewrite_usage_* /
_rewrite_streaming_usage_from_ctx subtree is unreachable, and NVIDIA#15042's
json.loads-skip optimization sits inside it (a no-op). main already rewrites
disagg usage via postprocess_handlers and relays streaming bytes untouched, so
the optimized per-chunk-parse path no longer exists.

Remove the dead methods and the now-orphaned imports (json, AsyncIterator,
PromptTokensDetails). No behavior change: the live usage path is unaffected.

Signed-off-by: Lance Liao <108499334+lancelly@users.noreply.github.com>
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.

8 participants