Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
e6df420
[TRTLLM-17273][chore] Choose the trtllm-serve post-processing path on…
JunyiXu-nv Oct 28, 2026
259fdf6
[TRTLLM-17272][feat] Add public LLM health queries and a private-acce…
JunyiXu-nv Oct 28, 2026
ef64f31
Fix frontend lint coverage and health test cleanup
JunyiXu-nv Nov 1, 2026
5806927
[TRTLLM-17273][test] Initialize postprocessing mode in metrics fixture
JunyiXu-nv Nov 1, 2026
08a1435
[TRTLLM-17264][test] Characterize the VisualGen validation-error enve…
JunyiXu-nv Oct 28, 2026
2ca8b27
[TRTLLM-17264][refactor] Merge the two VisualGen validation-error ren…
JunyiXu-nv Oct 28, 2026
73c213b
[TRTLLM-17272][feat] Add public runtime accessors for the remaining s…
JunyiXu-nv Nov 2, 2026
d4b6d14
[TRTLLM-17272][test] Call _on_launcher_lost on a stand-in instead of …
JunyiXu-nv Nov 2, 2026
b291cca
[TRTLLM-17261][test] Add route, middleware-order and shim-identity sn…
JunyiXu-nv Oct 28, 2026
c9311ab
[TRTLLM-17261][test] Record the trtllm-serve route reference and test…
JunyiXu-nv Nov 1, 2026
81b0350
[TRTLLM-17261][test] Cover the attached-frontend route registration i…
JunyiXu-nv Nov 1, 2026
2eb184a
[None][test] Address review of the serve snapshot and layering tests
JunyiXu-nv Nov 2, 2026
5138e15
[TRTLLM-17261][test] Refresh the serve route reference and baselines …
JunyiXu-nv Nov 4, 2026
045a69e
[None][test] Make the route snapshot and the object.__new__ ratchet f…
JunyiXu-nv Nov 4, 2026
75fc8e7
[TRTLLM-17262][test] Pin the disaggregated entry-point wrapper and it…
JunyiXu-nv Nov 2, 2026
533cb0b
[TRTLLM-17262][refactor] Split the disaggregated entry-point wrapper …
JunyiXu-nv Nov 2, 2026
1a3a615
[TRTLLM-17262][refactor] Shared middleware package for the aggregated…
JunyiXu-nv Nov 2, 2026
a0aa0df
[TRTLLM-17262][refactor] ServerArrivalTimeMiddleware keeps an existin…
JunyiXu-nv Nov 2, 2026
68344ed
[TRTLLM-17261][refactor] Move the msgpack route classes to tensorrt_l…
JunyiXu-nv Nov 2, 2026
9f4a48e
[TRTLLM-17261][refactor] Add the trtllm-serve router skeleton and ser…
JunyiXu-nv Nov 2, 2026
caf3a29
[TRTLLM-17261][infra] Multi-GPU triggers and type checking for the ne…
JunyiXu-nv Nov 2, 2026
4a6325d
[TRTLLM-17261][test] Register the system router in the multi-frontend…
JunyiXu-nv Nov 2, 2026
7e29509
[TRTLLM-17261][test] Match a request instead of reading route paths i…
JunyiXu-nv Nov 2, 2026
d3aacdd
[TRTLLM-17261][test] Classify endpoint-package imports by the importe…
JunyiXu-nv Nov 2, 2026
5bcd0a1
[TRTLLM-17264][refactor] Move the VisualGen protocol models into serv…
JunyiXu-nv Nov 3, 2026
9b8661f
[TRTLLM-17264][infra] Give tensorrt_llm/serve/api/visual_gen to the V…
JunyiXu-nv Nov 3, 2026
e122006
[TRTLLM-17264][test] Gate the VisualGen protocol models and their laz…
JunyiXu-nv Nov 3, 2026
18a8b2f
[TRTLLM-17264][test] Harden the VisualGen api-stability gate and pin …
JunyiXu-nv Nov 3, 2026
543322f
[TRTLLM-17263][test] Pin the chat completion handler's HTTP answers b…
JunyiXu-nv Nov 3, 2026
6174ee4
[TRTLLM-17263][refactor] Move the chat SSE generator to tensorrt_llm/…
JunyiXu-nv Nov 3, 2026
bd6b3d7
[TRTLLM-17263][refactor] Split openai_chat into a typed create_chat_c…
JunyiXu-nv Nov 3, 2026
936cc54
[TRTLLM-17263][infra] Type-check tensorrt_llm/serve/_base/errors.py
JunyiXu-nv Nov 3, 2026
974e4bd
[TRTLLM-17263][test] Stub the chat response as a ChatCompletionRespon…
JunyiXu-nv Nov 3, 2026
d8c56b5
[TRTLLM-17263][test] Pin that an unencodable chat response is answere…
JunyiXu-nv Nov 3, 2026
bbea912
[TRTLLM-17269][chore] Merge the router skeleton branch into the middl…
JunyiXu-nv Nov 4, 2026
752da8b
[TRTLLM-17263][refactor] Move the Anthropic Messages modules into ser…
JunyiXu-nv Nov 3, 2026
147c114
[TRTLLM-17263][test] Pin both servers' Anthropic Messages answers and…
JunyiXu-nv Nov 3, 2026
51fa901
Merge the VisualGen validation-renderer branch (#21408) into the Visu…
JunyiXu-nv Nov 4, 2026
aa73407
Merge branch 'dev-junyix-feat-serve-typed-chat-core' into dev-junyix-…
JunyiXu-nv Nov 4, 2026
db50772
Merge branch 'dev-junyix-feat-serve-disagg-entry-split' into dev-juny…
JunyiXu-nv Nov 4, 2026
31fa80b
[TRTLLM-17263][refactor] Add the Anthropic count-tokens and batches s…
JunyiXu-nv Nov 3, 2026
95bb1e1
[TRTLLM-17263][refactor] Move the Anthropic count-tokens and batch ha…
JunyiXu-nv Nov 3, 2026
d5e971e
[TRTLLM-17263][refactor] One Anthropic Messages serving class for the…
JunyiXu-nv Nov 3, 2026
1842630
[TRTLLM-17264][refactor] Move the VisualGen handlers and modules into…
JunyiXu-nv Nov 3, 2026
0de3561
[TRTLLM-17264][refactor] Wire the VisualGen serving classes and route…
JunyiXu-nv Nov 3, 2026
4401fd1
[TRTLLM-17264][test] Pin the VisualGen serving classes, router and me…
JunyiXu-nv Nov 3, 2026
5c7b7ed
[TRTLLM-17264][chore] Name the VisualGen serving package in serve/AGE…
JunyiXu-nv Nov 3, 2026
ece037b
[TRTLLM-17264][refactor] Keep the moved video module faithful and rew…
JunyiXu-nv Nov 3, 2026
07016ff
[TRTLLM-17263][test] Test the Anthropic serving class, the request co…
JunyiXu-nv Nov 3, 2026
633a332
[TRTLLM-17269][refactor] Add build_http_app and serve_uvicorn, the sh…
JunyiXu-nv Nov 3, 2026
24f9585
[TRTLLM-17269][refactor] Build the aggregated and disaggregated trtll…
JunyiXu-nv Nov 3, 2026
1fc2c43
[TRTLLM-17265][refactor] Split openai_protocol.py into a package with…
JunyiXu-nv Nov 4, 2026
df75a2b
[TRTLLM-17265][test] Pin the openai_protocol facade: completeness, la…
JunyiXu-nv Nov 3, 2026
8d62a8e
[TRTLLM-17265][refactor] State why the facade keeps the VisualGen row…
JunyiXu-nv Nov 3, 2026
d2e8afb
Merge branch 'dev-junyix-feat-serve-public-runtime-members' into dev-…
JunyiXu-nv Nov 4, 2026
9c46c6f
[TRTLLM-17267][refactor] Add the serving-class skeletons for embeddin…
JunyiXu-nv Nov 3, 2026
898dfd2
[TRTLLM-17267][refactor] Move the embeddings, multimodal-encoder and …
JunyiXu-nv Nov 3, 2026
b00ab56
[TRTLLM-17267][refactor] Wire the embeddings, multimodal-encoder and …
JunyiXu-nv Nov 3, 2026
582820f
[TRTLLM-17267][test] Cover the embeddings, multimodal-encoder and tok…
JunyiXu-nv Nov 3, 2026
63d51ce
[TRTLLM-17267][infra] Register the new serving packages with CI, mypy…
JunyiXu-nv Nov 3, 2026
64538b3
[TRTLLM-17267][test] Let the OpenEngine Prometheus test's constructor…
JunyiXu-nv Nov 3, 2026
600bcd5
[TRTLLM-17267][test] Let the multi-frontend tests re-enact the compos…
JunyiXu-nv Nov 3, 2026
0d6a309
Merge branch 'dev-junyix-feat-serve-one-postproc-strategy' into dev-j…
JunyiXu-nv Nov 4, 2026
d95c207
[TRTLLM-17267][refactor] Add the completions serving-class skeleton a…
JunyiXu-nv Nov 4, 2026
d18194e
[TRTLLM-17267][refactor] Move the completions handler into Completion…
JunyiXu-nv Nov 4, 2026
201d308
[TRTLLM-17267][refactor] Serve /v1/completions through the completion…
JunyiXu-nv Nov 4, 2026
265a314
[TRTLLM-17267][test] Cover CompletionServing and its lifted functions…
JunyiXu-nv Nov 4, 2026
a79f267
[TRTLLM-17267][infra] Register the completions package with the multi…
JunyiXu-nv Nov 4, 2026
93367ef
[TRTLLM-17267][test] Give the remaining hand-built servers and the ba…
JunyiXu-nv Nov 4, 2026
e5bf127
[TRTLLM-17267][refactor] Name the collector-task getter argument afte…
JunyiXu-nv Nov 4, 2026
6998c2b
[TRTLLM-17263][test] Mount the Messages usage test on the Anthropic r…
JunyiXu-nv Nov 4, 2026
db58a94
Merge branch 'dev-junyix-feat-serve-anthropic-serving-class' into dev…
JunyiXu-nv Nov 4, 2026
7c57859
[TRTLLM-17267][refactor] Add the chat serving-class skeleton and the …
JunyiXu-nv Nov 4, 2026
2eaedf2
[TRTLLM-17267][refactor] Move the chat handlers into ChatServing
JunyiXu-nv Nov 4, 2026
7323adc
[TRTLLM-17267][refactor] Serve /v1/chat/completions through the chat …
JunyiXu-nv Nov 4, 2026
ce382fd
[TRTLLM-17267][refactor] Keep the two internal-disaggregated validati…
JunyiXu-nv Nov 4, 2026
70cf99e
[TRTLLM-17267][test] Cover ChatServing and build the chat tests on se…
JunyiXu-nv Nov 4, 2026
f7e11e7
[TRTLLM-17267][test] Record the moved anext in the legacy lint baseli…
JunyiXu-nv Nov 4, 2026
b9aae2f
Merge branch 'dev-junyix-feat-serve-shared-app-assembly' into dev-jun…
JunyiXu-nv Nov 5, 2026
463f37a
Merge branch 'dev-junyix-feat-serve-visualgen-handler-move' into dev-…
JunyiXu-nv Nov 5, 2026
47362fa
[TRTLLM-17267][refactor] Add the ops serving-class skeletons and regi…
JunyiXu-nv Nov 5, 2026
613c1b5
[TRTLLM-17267][refactor] Move the operational endpoints into their se…
JunyiXu-nv Nov 5, 2026
0f0273a
[TRTLLM-17267][refactor] Serve the operational endpoints through rout…
JunyiXu-nv Nov 5, 2026
40094c0
[TRTLLM-17267][test] Cover the ops serving classes and build the ops …
JunyiXu-nv Nov 5, 2026
1ad84f4
[TRTLLM-17267][test] Pin the Prometheus mount to the LLM role group a…
JunyiXu-nv Nov 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ failed_prs: []
- **Detection signal:** gen-server host time before the first forward step
grows with prompt length (tokenizer + block-key construction spans in a
py-spy/nsys host profile); verify the guard exists with
`grep -n "prompt_token_ids is not None" tensorrt_llm/serve/openai_server.py`
`grep -n "prompt_token_ids is not None" tensorrt_llm/serve/api/openai/chat/serving.py`
and compare ctx-vs-gen TTFT via the server's `/perf_metrics` endpoint
(requires `TRTLLM_KVCACHE_TIME_OUTPUT_PATH` to be set on this path).
- **Prevention/guard:** the PR adds
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@
/cpp/tensorrt_llm/thop/*lysses* @NVIDIA/trt-llm-torch-visual-gen-devs
/cpp/tensorrt_llm/kernels/ulysses* @NVIDIA/trt-llm-torch-visual-gen-devs
/tensorrt_llm/media @NVIDIA/trt-llm-torch-visual-gen-devs
/tensorrt_llm/serve/api/visual_gen @NVIDIA/trt-llm-torch-visual-gen-devs
/tensorrt_llm/visual_gen @NVIDIA/trt-llm-torch-visual-gen-devs @NVIDIA/trt-llm-runtime-devs
/tests/integration/defs/examples/visual_gen @NVIDIA/trt-llm-torch-visual-gen-devs
/tests/integration/defs/visual_gen @NVIDIA/trt-llm-torch-visual-gen-devs
Expand Down
75 changes: 71 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,46 @@ common-files: &common_files |
tensorrt_llm/scaffolding/worker.py |
tensorrt_llm/scheduling_params.py |
tensorrt_llm/serve/__init__.py |
tensorrt_llm/serve/_base/msgspec_route.py |
tensorrt_llm/serve/_base/serving.py |
tensorrt_llm/serve/_base/sse.py |
tensorrt_llm/serve/api/anthropic/serving.py |
tensorrt_llm/serve/api/openai/chat/serving.py |
tensorrt_llm/serve/api/openai/completions/_merge.py |
tensorrt_llm/serve/api/openai/completions/serving.py |
tensorrt_llm/serve/api/openai/embeddings/serving.py |
tensorrt_llm/serve/api/openai/mm_encoder/serving.py |
tensorrt_llm/serve/api/openai/tokenize/serving.py |
tensorrt_llm/serve/api/ops/metrics/prometheus.py |
tensorrt_llm/serve/api/ops/metrics/serving.py |
tensorrt_llm/serve/api/ops/profile/serving.py |
tensorrt_llm/serve/api/ops/rl/serving.py |
tensorrt_llm/serve/api/ops/runtime_control/serving.py |
tensorrt_llm/serve/api/ops/worker/serving.py |
tensorrt_llm/serve/api/visual_gen/media.py |
tensorrt_llm/serve/api/visual_gen/protocol.py |
tensorrt_llm/serve/api/visual_gen/serving_base.py |
tensorrt_llm/serve/api/visual_gen/serving_images.py |
tensorrt_llm/serve/chat_utils.py |
tensorrt_llm/serve/cluster_storage.py |
tensorrt_llm/serve/disagg_auto_scaling.py |
tensorrt_llm/serve/harmony_adapter.py |
tensorrt_llm/serve/metadata_server.py |
tensorrt_llm/serve/middleware/arrival_time.py |
tensorrt_llm/serve/middleware/user_middleware.py |
tensorrt_llm/serve/openai_disagg_server.py |
tensorrt_llm/serve/openai_protocol.py |
tensorrt_llm/serve/openai_protocol/chat.py |
tensorrt_llm/serve/openai_protocol/common.py |
tensorrt_llm/serve/openai_protocol/completions.py |
tensorrt_llm/serve/openai_protocol/control.py |
tensorrt_llm/serve/openai_protocol/disagg.py |
tensorrt_llm/serve/openai_protocol/embeddings.py |
tensorrt_llm/serve/openai_protocol/kv_cache.py |
tensorrt_llm/serve/openai_protocol/models.py |
tensorrt_llm/serve/openai_protocol/responses.py |
tensorrt_llm/serve/openai_protocol/sampling.py |
tensorrt_llm/serve/openai_protocol/tokenize.py |
tensorrt_llm/serve/openai_protocol/tools.py |
tensorrt_llm/serve/openai_server.py |
tensorrt_llm/serve/postprocess_handlers.py |
tensorrt_llm/serve/responses_utils.py |
Expand Down Expand Up @@ -1144,13 +1177,46 @@ legacy-files: &legacy_files |
tensorrt_llm/scaffolding/worker.py |
tensorrt_llm/scheduling_params.py |
tensorrt_llm/serve/__init__.py |
tensorrt_llm/serve/_base/msgspec_route.py |
tensorrt_llm/serve/_base/serving.py |
tensorrt_llm/serve/_base/sse.py |
tensorrt_llm/serve/api/anthropic/serving.py |
tensorrt_llm/serve/api/openai/chat/serving.py |
tensorrt_llm/serve/api/openai/completions/_merge.py |
tensorrt_llm/serve/api/openai/completions/serving.py |
tensorrt_llm/serve/api/openai/embeddings/serving.py |
tensorrt_llm/serve/api/openai/mm_encoder/serving.py |
tensorrt_llm/serve/api/openai/tokenize/serving.py |
tensorrt_llm/serve/api/ops/metrics/prometheus.py |
tensorrt_llm/serve/api/ops/metrics/serving.py |
tensorrt_llm/serve/api/ops/profile/serving.py |
tensorrt_llm/serve/api/ops/rl/serving.py |
tensorrt_llm/serve/api/ops/runtime_control/serving.py |
tensorrt_llm/serve/api/ops/worker/serving.py |
tensorrt_llm/serve/api/visual_gen/media.py |
tensorrt_llm/serve/api/visual_gen/protocol.py |
tensorrt_llm/serve/api/visual_gen/serving_base.py |
tensorrt_llm/serve/api/visual_gen/serving_images.py |
tensorrt_llm/serve/chat_utils.py |
tensorrt_llm/serve/cluster_storage.py |
tensorrt_llm/serve/disagg_auto_scaling.py |
tensorrt_llm/serve/harmony_adapter.py |
tensorrt_llm/serve/metadata_server.py |
tensorrt_llm/serve/middleware/arrival_time.py |
tensorrt_llm/serve/middleware/user_middleware.py |
tensorrt_llm/serve/openai_disagg_server.py |
tensorrt_llm/serve/openai_protocol.py |
tensorrt_llm/serve/openai_protocol/chat.py |
tensorrt_llm/serve/openai_protocol/common.py |
tensorrt_llm/serve/openai_protocol/completions.py |
tensorrt_llm/serve/openai_protocol/control.py |
tensorrt_llm/serve/openai_protocol/disagg.py |
tensorrt_llm/serve/openai_protocol/embeddings.py |
tensorrt_llm/serve/openai_protocol/kv_cache.py |
tensorrt_llm/serve/openai_protocol/models.py |
tensorrt_llm/serve/openai_protocol/responses.py |
tensorrt_llm/serve/openai_protocol/sampling.py |
tensorrt_llm/serve/openai_protocol/tokenize.py |
tensorrt_llm/serve/openai_protocol/tools.py |
tensorrt_llm/serve/openai_server.py |
tensorrt_llm/serve/postprocess_handlers.py |
tensorrt_llm/serve/responses_utils.py |
Expand Down Expand Up @@ -1620,6 +1686,7 @@ repos:
# Run mypy with no explicit paths so it type-checks the set declared in
# pyproject.toml [tool.mypy] `files` (single source of truth). This
# `files:` pattern only decides when the hook triggers — any change under
# the sampler source/test dirs.
# the sampler source/test dirs or the serving frontends. A PR that adds
# a typed module elsewhere extends this pattern in the same PR.
pass_filenames: false
files: ^(tensorrt_llm/_torch/pyexecutor/sampler/|tests/unittest/_torch/sampler/)
files: ^(tensorrt_llm/_torch/pyexecutor/sampler/|tests/unittest/_torch/sampler/|tensorrt_llm/serve/|tensorrt_llm/commands/serve_cli/)
2 changes: 1 addition & 1 deletion docs/source/features/sleep-wakeup.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ Principal implementation locations are:

- Synchronous API: `tensorrt_llm/llmapi/llm.py`
- Asynchronous API: `tensorrt_llm/_torch/async_llm.py`
- Serving and authentication: `tensorrt_llm/serve/openai_server.py` and
- Serving and authentication: `tensorrt_llm/serve/api/ops/runtime_control/` and
`tensorrt_llm/serve/runtime_control_auth.py`
- Workers: `tensorrt_llm/executor/base_worker.py` and
`tensorrt_llm/executor/ray/gpu_worker.py`
Expand Down
14 changes: 14 additions & 0 deletions jenkins/L0_MergeRequest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1948,10 +1948,24 @@ def getMultiGpuFileChanged(pipeline, testFilter, globalVars)
"tensorrt_llm/models/llama/",
"tensorrt_llm/parameter.py",
"tensorrt_llm/serve/__init__.py",
// _MsgspecRoute decodes the disaggregated frontend's msgpack bodies.
"tensorrt_llm/serve/_base/",
// The disaggregated /v1/messages runs through the Anthropic serving class.
"tensorrt_llm/serve/api/anthropic/api_router.py",
"tensorrt_llm/serve/api/anthropic/serving.py",
// Code moved out of tensorrt_llm/serve/openai_server.py keeps its trigger.
"tensorrt_llm/serve/api/openai/chat/",
"tensorrt_llm/serve/api/openai/completions/",
"tensorrt_llm/serve/api/openai/embeddings/",
"tensorrt_llm/serve/api/openai/mm_encoder/",
"tensorrt_llm/serve/api/openai/tokenize/",
// /health is the disaggregated readiness probe.
"tensorrt_llm/serve/api/ops/",
"tensorrt_llm/serve/cluster_storage.py",
"tensorrt_llm/serve/disagg_auto_scaling.py",
"tensorrt_llm/serve/extensions/",
"tensorrt_llm/serve/metadata_server.py",
"tensorrt_llm/serve/middleware/",
"tensorrt_llm/serve/openai_client.py",
"tensorrt_llm/serve/openai_disagg_server.py",
"tensorrt_llm/serve/openai_disagg_service.py",
Expand Down
35 changes: 34 additions & 1 deletion legacy-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,46 @@ tensorrt_llm/scaffolding/task_collection.py
tensorrt_llm/scaffolding/worker.py
tensorrt_llm/scheduling_params.py
tensorrt_llm/serve/__init__.py
tensorrt_llm/serve/_base/msgspec_route.py
tensorrt_llm/serve/_base/serving.py
tensorrt_llm/serve/_base/sse.py
tensorrt_llm/serve/api/anthropic/serving.py
tensorrt_llm/serve/api/openai/chat/serving.py
tensorrt_llm/serve/api/openai/completions/_merge.py
tensorrt_llm/serve/api/openai/completions/serving.py
tensorrt_llm/serve/api/openai/embeddings/serving.py
tensorrt_llm/serve/api/openai/mm_encoder/serving.py
tensorrt_llm/serve/api/openai/tokenize/serving.py
tensorrt_llm/serve/api/ops/metrics/prometheus.py
tensorrt_llm/serve/api/ops/metrics/serving.py
tensorrt_llm/serve/api/ops/profile/serving.py
tensorrt_llm/serve/api/ops/rl/serving.py
tensorrt_llm/serve/api/ops/runtime_control/serving.py
tensorrt_llm/serve/api/ops/worker/serving.py
tensorrt_llm/serve/api/visual_gen/media.py
tensorrt_llm/serve/api/visual_gen/protocol.py
tensorrt_llm/serve/api/visual_gen/serving_base.py
tensorrt_llm/serve/api/visual_gen/serving_images.py
tensorrt_llm/serve/chat_utils.py
tensorrt_llm/serve/cluster_storage.py
tensorrt_llm/serve/disagg_auto_scaling.py
tensorrt_llm/serve/harmony_adapter.py
tensorrt_llm/serve/metadata_server.py
tensorrt_llm/serve/middleware/arrival_time.py
tensorrt_llm/serve/middleware/user_middleware.py
tensorrt_llm/serve/openai_disagg_server.py
tensorrt_llm/serve/openai_protocol.py
tensorrt_llm/serve/openai_protocol/chat.py
tensorrt_llm/serve/openai_protocol/common.py
tensorrt_llm/serve/openai_protocol/completions.py
tensorrt_llm/serve/openai_protocol/control.py
tensorrt_llm/serve/openai_protocol/disagg.py
tensorrt_llm/serve/openai_protocol/embeddings.py
tensorrt_llm/serve/openai_protocol/kv_cache.py
tensorrt_llm/serve/openai_protocol/models.py
tensorrt_llm/serve/openai_protocol/responses.py
tensorrt_llm/serve/openai_protocol/sampling.py
tensorrt_llm/serve/openai_protocol/tokenize.py
tensorrt_llm/serve/openai_protocol/tools.py
tensorrt_llm/serve/openai_server.py
tensorrt_llm/serve/postprocess_handlers.py
tensorrt_llm/serve/responses_utils.py
Expand Down
58 changes: 57 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -474,13 +474,46 @@ exclude = [
"tensorrt_llm/scaffolding/worker.py",
"tensorrt_llm/scheduling_params.py",
"tensorrt_llm/serve/__init__.py",
"tensorrt_llm/serve/_base/msgspec_route.py",
"tensorrt_llm/serve/_base/serving.py",
"tensorrt_llm/serve/_base/sse.py",
"tensorrt_llm/serve/api/anthropic/serving.py",
"tensorrt_llm/serve/api/openai/chat/serving.py",
"tensorrt_llm/serve/api/openai/completions/_merge.py",
"tensorrt_llm/serve/api/openai/completions/serving.py",
"tensorrt_llm/serve/api/openai/embeddings/serving.py",
"tensorrt_llm/serve/api/openai/mm_encoder/serving.py",
"tensorrt_llm/serve/api/openai/tokenize/serving.py",
"tensorrt_llm/serve/api/ops/metrics/prometheus.py",
"tensorrt_llm/serve/api/ops/metrics/serving.py",
"tensorrt_llm/serve/api/ops/profile/serving.py",
"tensorrt_llm/serve/api/ops/rl/serving.py",
"tensorrt_llm/serve/api/ops/runtime_control/serving.py",
"tensorrt_llm/serve/api/ops/worker/serving.py",
"tensorrt_llm/serve/api/visual_gen/media.py",
"tensorrt_llm/serve/api/visual_gen/protocol.py",
"tensorrt_llm/serve/api/visual_gen/serving_base.py",
"tensorrt_llm/serve/api/visual_gen/serving_images.py",
"tensorrt_llm/serve/chat_utils.py",
"tensorrt_llm/serve/cluster_storage.py",
"tensorrt_llm/serve/disagg_auto_scaling.py",
"tensorrt_llm/serve/harmony_adapter.py",
"tensorrt_llm/serve/metadata_server.py",
"tensorrt_llm/serve/middleware/arrival_time.py",
"tensorrt_llm/serve/middleware/user_middleware.py",
"tensorrt_llm/serve/openai_disagg_server.py",
"tensorrt_llm/serve/openai_protocol.py",
"tensorrt_llm/serve/openai_protocol/chat.py",
"tensorrt_llm/serve/openai_protocol/common.py",
"tensorrt_llm/serve/openai_protocol/completions.py",
"tensorrt_llm/serve/openai_protocol/control.py",
"tensorrt_llm/serve/openai_protocol/disagg.py",
"tensorrt_llm/serve/openai_protocol/embeddings.py",
"tensorrt_llm/serve/openai_protocol/kv_cache.py",
"tensorrt_llm/serve/openai_protocol/models.py",
"tensorrt_llm/serve/openai_protocol/responses.py",
"tensorrt_llm/serve/openai_protocol/sampling.py",
"tensorrt_llm/serve/openai_protocol/tokenize.py",
"tensorrt_llm/serve/openai_protocol/tools.py",
"tensorrt_llm/serve/openai_server.py",
"tensorrt_llm/serve/postprocess_handlers.py",
"tensorrt_llm/serve/responses_utils.py",
Expand Down Expand Up @@ -862,6 +895,29 @@ files = [
"tensorrt_llm/_torch/pyexecutor/sampler/token_ban.py",
"tensorrt_llm/_torch/pyexecutor/sampler/ops/flashinfer.py",
"tensorrt_llm/_torch/pyexecutor/sampler/ops/vanilla.py",
"tensorrt_llm/llmapi/engine_client.py",
"tensorrt_llm/serve/_base/app_builder.py",
"tensorrt_llm/serve/_base/chat_backend.py",
"tensorrt_llm/serve/_base/errors.py",
"tensorrt_llm/serve/_base/request_context.py",
"tensorrt_llm/serve/_base/routing.py",
"tensorrt_llm/serve/api/anthropic/api_router.py",
"tensorrt_llm/serve/api/openai/chat/api_router.py",
"tensorrt_llm/serve/api/openai/completions/api_router.py",
"tensorrt_llm/serve/api/openai/embeddings/api_router.py",
"tensorrt_llm/serve/api/openai/mm_encoder/api_router.py",
"tensorrt_llm/serve/api/openai/tokenize/api_router.py",
"tensorrt_llm/serve/api/ops/control/api_router.py",
"tensorrt_llm/serve/api/ops/metrics/api_router.py",
"tensorrt_llm/serve/api/ops/profile/api_router.py",
"tensorrt_llm/serve/api/ops/rl/api_router.py",
"tensorrt_llm/serve/api/ops/runtime_control/api_router.py",
"tensorrt_llm/serve/api/ops/system/api_router.py",
"tensorrt_llm/serve/api/ops/system/serving.py",
"tensorrt_llm/serve/api/ops/worker/api_router.py",
"tensorrt_llm/serve/api/visual_gen/api_router.py",
"tensorrt_llm/serve/api/visual_gen/errors.py",
"tensorrt_llm/serve/middleware/register.py",
"tests/unittest/_torch/sampler/test_torch_sampler.py",
"tests/unittest/_torch/sampler/test_token_ban.py",
"tests/unittest/_torch/sampler/test_beam_search.py",
Expand Down
12 changes: 12 additions & 0 deletions ruff-legacy-baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,15 @@
"tensorrt_llm/scaffolding/task.py": {
"F821": 1
},
"tensorrt_llm/serve/_base/sse.py": {
"F821": 1
},
"tensorrt_llm/serve/api/openai/chat/serving.py": {
"F821": 1
},
"tensorrt_llm/serve/api/openai/completions/_merge.py": {
"F821": 1
},
"tensorrt_llm/serve/disagg_auto_scaling.py": {
"D205": 2,
"D212": 2
Expand All @@ -539,6 +548,9 @@
"D212": 19,
"D415": 1
},
"tensorrt_llm/serve/middleware/arrival_time.py": {
"D212": 1
},
"tensorrt_llm/serve/openai_disagg_server.py": {
"D210": 1,
"F811": 1
Expand Down
35 changes: 34 additions & 1 deletion ruff-legacy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -426,13 +426,46 @@ include = [
"tensorrt_llm/scaffolding/worker.py",
"tensorrt_llm/scheduling_params.py",
"tensorrt_llm/serve/__init__.py",
"tensorrt_llm/serve/_base/msgspec_route.py",
"tensorrt_llm/serve/_base/serving.py",
"tensorrt_llm/serve/_base/sse.py",
"tensorrt_llm/serve/api/anthropic/serving.py",
"tensorrt_llm/serve/api/openai/chat/serving.py",
"tensorrt_llm/serve/api/openai/completions/_merge.py",
"tensorrt_llm/serve/api/openai/completions/serving.py",
"tensorrt_llm/serve/api/openai/embeddings/serving.py",
"tensorrt_llm/serve/api/openai/mm_encoder/serving.py",
"tensorrt_llm/serve/api/openai/tokenize/serving.py",
"tensorrt_llm/serve/api/ops/metrics/prometheus.py",
"tensorrt_llm/serve/api/ops/metrics/serving.py",
"tensorrt_llm/serve/api/ops/profile/serving.py",
"tensorrt_llm/serve/api/ops/rl/serving.py",
"tensorrt_llm/serve/api/ops/runtime_control/serving.py",
"tensorrt_llm/serve/api/ops/worker/serving.py",
"tensorrt_llm/serve/api/visual_gen/media.py",
"tensorrt_llm/serve/api/visual_gen/protocol.py",
"tensorrt_llm/serve/api/visual_gen/serving_base.py",
"tensorrt_llm/serve/api/visual_gen/serving_images.py",
"tensorrt_llm/serve/chat_utils.py",
"tensorrt_llm/serve/cluster_storage.py",
"tensorrt_llm/serve/disagg_auto_scaling.py",
"tensorrt_llm/serve/harmony_adapter.py",
"tensorrt_llm/serve/metadata_server.py",
"tensorrt_llm/serve/middleware/arrival_time.py",
"tensorrt_llm/serve/middleware/user_middleware.py",
"tensorrt_llm/serve/openai_disagg_server.py",
"tensorrt_llm/serve/openai_protocol.py",
"tensorrt_llm/serve/openai_protocol/chat.py",
"tensorrt_llm/serve/openai_protocol/common.py",
"tensorrt_llm/serve/openai_protocol/completions.py",
"tensorrt_llm/serve/openai_protocol/control.py",
"tensorrt_llm/serve/openai_protocol/disagg.py",
"tensorrt_llm/serve/openai_protocol/embeddings.py",
"tensorrt_llm/serve/openai_protocol/kv_cache.py",
"tensorrt_llm/serve/openai_protocol/models.py",
"tensorrt_llm/serve/openai_protocol/responses.py",
"tensorrt_llm/serve/openai_protocol/sampling.py",
"tensorrt_llm/serve/openai_protocol/tokenize.py",
"tensorrt_llm/serve/openai_protocol/tools.py",
"tensorrt_llm/serve/openai_server.py",
"tensorrt_llm/serve/postprocess_handlers.py",
"tensorrt_llm/serve/responses_utils.py",
Expand Down
3 changes: 2 additions & 1 deletion tensorrt_llm/_torch/pyexecutor/profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ def stop_profile(self) -> None:
HTTP handler the server layer is responsible for tickling
the executor loop so the stop iteration actually runs even
when the engine would otherwise be idle (see
``OpenAIServer.stop_profile``).
``ProfileServing.stop_profile`` in
``tensorrt_llm/serve/api/ops/profile/serving.py``).
"""
executor = self._executor
# Apply locally so diagnostic state (profile_stop_iters,
Expand Down
17 changes: 15 additions & 2 deletions tensorrt_llm/_torch/pyexecutor/py_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from contextlib import ExitStack, contextmanager, nullcontext
from enum import IntEnum
from queue import Queue
from typing import (TYPE_CHECKING, Callable, Dict, Iterable, Iterator, List,
Literal, NoReturn, Optional, Tuple, Union)
from typing import (TYPE_CHECKING, Any, Callable, Dict, Iterable, Iterator,
List, Literal, NoReturn, Optional, Tuple, Union)

import torch
from strenum import StrEnum
Expand Down Expand Up @@ -2749,6 +2749,19 @@ def get_openengine_discovery(self) -> dict:
"""Return immutable-at-startup OpenEngine node and publisher discovery."""
return self._openengine_discovery

def set_openengine_discovery(self, discovery: dict) -> None:
"""Record OpenEngine node and KV-event publisher discovery metadata.

Called once at startup by the OpenEngine node-discovery hook
(tensorrt_llm/grpc/openengine/node.py); get_openengine_discovery()
returns it.
"""
self._openengine_discovery = discovery

def set_openengine_node_server(self, server: Any) -> None:
"""Adopt the OpenEngine node metadata server; shutdown closes it."""
self._openengine_node_server = server

def get_kv_cache_load(self) -> dict:
"""Return the scheduler-owned KV load snapshot.

Expand Down
Loading
Loading