Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fbdc9c8
[TRTLLM-17271][refactor] Stop trtllm-serve launchers from mutating ca…
JunyiXu-nv Oct 28, 2026
cb521e1
Cover validated connector handoff in gRPC launchers
JunyiXu-nv Nov 1, 2026
ffd5c84
Make gRPC launcher tests expose internal import errors
JunyiXu-nv Nov 1, 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
11e206a
[None][chore] Merge main (a0ce6c8474) into dev-junyix-feat-serve-beha…
JunyiXu-nv Nov 4, 2026
82de6f9
[None][chore] Merge main (f6405a5965) into dev-junyix-feat-serve-beha…
JunyiXu-nv Nov 4, 2026
b5a1f14
[None][chore] Merge main (38ab02f379) into dev-junyix-feat-serve-beha…
JunyiXu-nv Nov 5, 2026
6361c24
[None][chore] Merge main (748dc201e8) into dev-junyix-feat-serve-beha…
JunyiXu-nv Nov 5, 2026
e5d3df5
[None][test] Expose batch limits on the serve test encoder executor fake
JunyiXu-nv Nov 5, 2026
1c2d6e1
[None][chore] Merge main (10e1d1f07d) into dev-junyix-feat-serve-no-c…
JunyiXu-nv Nov 9, 2026
bb01501
[TRTLLM-17271][refactor] Create commands/serve_cli and register it wi…
JunyiXu-nv Nov 10, 2026
35e0ed0
[TRTLLM-17271][refactor] Move the listener helpers of trtllm-serve in…
JunyiXu-nv Nov 10, 2026
dbafa6f
[TRTLLM-17271][refactor] Bind every trtllm-serve listener through one…
JunyiXu-nv Nov 10, 2026
fb0cfd8
[TRTLLM-17271][test] Pin the policy of every trtllm-serve listener an…
JunyiXu-nv Nov 10, 2026
19c3bf5
[TRTLLM-17271][test] Pin the kernel-assigned port readback and the po…
JunyiXu-nv Nov 10, 2026
f255acf
[TRTLLM-17271][test] Keep the disaggregated server's logger level and…
JunyiXu-nv Nov 10, 2026
a9dbd1f
Merge the Z6a PR head into the socket-helper base (integration base, …
JunyiXu-nv Nov 10, 2026
8119dab
[TRTLLM-17271][refactor] Declare trtllm-serve config precedence and s…
JunyiXu-nv Nov 10, 2026
f66074a
[TRTLLM-17271][test] Pin which server keys each subcommand's config c…
JunyiXu-nv Nov 10, 2026
ed7d996
Merge the route, middleware-order and shim-identity snapshot tests (#…
JunyiXu-nv Nov 10, 2026
738ad3c
[TRTLLM-17271][refactor] Read trtllm-serve environment variables thro…
JunyiXu-nv Nov 10, 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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
/tensorrt_llm/commands/__init__.py @NVIDIA/trt-llm-runtime-devs
/tensorrt_llm/commands/serve.py @NVIDIA/trt-llm-runtime-devs
/tensorrt_llm/commands/utils.py @NVIDIA/trt-llm-runtime-devs
/tensorrt_llm/commands/serve_cli @NVIDIA/trt-llm-runtime-devs
/tensorrt_llm/executor @NVIDIA/trt-llm-runtime-devs
/tensorrt_llm/grpc @NVIDIA/trt-llm-runtime-devs
/tensorrt_llm/grpc/openengine @NVIDIA/trt-llm-runtime-devs @NVIDIA/trt-llm-dynamo-devs
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ common-files: &common_files |
tensorrt_llm/commands/bench.py |
tensorrt_llm/commands/eval.py |
tensorrt_llm/commands/serve.py |
tensorrt_llm/commands/serve_cli/_net.py |
tensorrt_llm/evaluate/__init__.py |
tensorrt_llm/evaluate/cnn_dailymail.py |
tensorrt_llm/evaluate/interface.py |
Expand Down Expand Up @@ -1058,6 +1059,7 @@ legacy-files: &legacy_files |
tensorrt_llm/commands/bench.py |
tensorrt_llm/commands/eval.py |
tensorrt_llm/commands/serve.py |
tensorrt_llm/commands/serve_cli/_net.py |
tensorrt_llm/evaluate/__init__.py |
tensorrt_llm/evaluate/cnn_dailymail.py |
tensorrt_llm/evaluate/interface.py |
Expand Down
1 change: 1 addition & 0 deletions legacy-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ tensorrt_llm/commands/__init__.py
tensorrt_llm/commands/bench.py
tensorrt_llm/commands/eval.py
tensorrt_llm/commands/serve.py
tensorrt_llm/commands/serve_cli/_net.py
tensorrt_llm/evaluate/__init__.py
tensorrt_llm/evaluate/cnn_dailymail.py
tensorrt_llm/evaluate/interface.py
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ exclude = [
"tensorrt_llm/commands/bench.py",
"tensorrt_llm/commands/eval.py",
"tensorrt_llm/commands/serve.py",
"tensorrt_llm/commands/serve_cli/_net.py",
"tensorrt_llm/evaluate/__init__.py",
"tensorrt_llm/evaluate/cnn_dailymail.py",
"tensorrt_llm/evaluate/interface.py",
Expand Down
1 change: 1 addition & 0 deletions ruff-legacy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ include = [
"tensorrt_llm/commands/bench.py",
"tensorrt_llm/commands/eval.py",
"tensorrt_llm/commands/serve.py",
"tensorrt_llm/commands/serve_cli/_net.py",
"tensorrt_llm/evaluate/__init__.py",
"tensorrt_llm/evaluate/cnn_dailymail.py",
"tensorrt_llm/evaluate/interface.py",
Expand Down
35 changes: 17 additions & 18 deletions scripts/generate_trtllm_serve_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def dwdp_fields(required: tuple[str, ...] = (), **values: object) -> dict:

def generate_serve_schema() -> dict:
"""Describe the YAML fragment merged with ordinary serving CLI arguments."""
from tensorrt_llm.llmapi.disagg_utils import DisaggClusterConfig, InternalRequestAuthKey
from tensorrt_llm.commands.serve_cli._serve_options import LIVE_OBJECT_PATHS, yaml_options
from tensorrt_llm.llmapi.llm_args import (
SERVE_CONFIG_ALIASES,
MoeLoadBalancerConfig,
Expand All @@ -210,12 +210,14 @@ def generate_serve_schema() -> dict:
properties = schema["properties"]
for alias, name in SERVE_CONFIG_ALIASES.items():
properties[alias] = copy.deepcopy(properties[name])
# Keep server-only fields aligned with serve.py.
properties.update(
allow_request_chat_template={"type": "boolean", "default": False},
internal_request_auth_key=_schema_for(InternalRequestAuthKey),
disagg_cluster=_nullable(_schema_for(DisaggClusterConfig, schema)),
)
# Server-only keys and live objects are declared in
# tensorrt_llm/commands/serve_cli/_serve_options.py.
for option in yaml_options("serve"):
if option.yaml_json_schema is not None:
key_schema = copy.deepcopy(dict(option.yaml_json_schema))
else:
key_schema = _schema_for(option.yaml_type, schema)
properties[option.yaml_key] = _nullable(key_schema) if option.yaml_nullable else key_schema
# Serving treats null as unset before constructing the non-optional telemetry model.
properties["telemetry_config"] = _nullable(properties["telemetry_config"])
# Keep accepted forms aligned with TorchLlmArgs.validate_load_balancer(): a mapping
Expand Down Expand Up @@ -282,18 +284,15 @@ def generate_serve_schema() -> dict:
{"properties": {name: {"const": 0} for name in pair}},
{"properties": {name: {"minimum": 1} for name in pair}, "required": list(pair)},
]
# These object/Any annotations are Python API hooks, not arbitrary YAML mappings.
# Update these restrictions when hooks are added or gain YAML construction support.
for name in ("batched_logits_processor", "checkpoint_loader", "_mpi_session"):
properties[name] = {
"type": "null",
"description": "Live objects require the Python LLM API.",
}
# Live objects are Python API hooks, not arbitrary YAML mappings; their paths
# and schema fragments are declared next to the server-only options.
for live in LIVE_OBJECT_PATHS:
if live.schema_model is None:
holder = properties
else:
holder = schema["$defs"][live.schema_model]["properties"]
holder[live.schema_property] = copy.deepcopy(dict(live.json_schema))
schema["allOf"] = _dwdp_launch_rules()
schema["$defs"]["RayPlacementConfig"]["properties"]["placement_groups"] = {"type": "null"}
user_draft = schema["$defs"]["UserProvidedDecodingConfig"]["properties"]
user_draft["drafter"] = {"not": {}, "description": "A Drafter requires the Python LLM API."}
user_draft["resource_manager"] = {"type": "null"}
# Update this mapping exception when the YAML loader changes legacy DecodingConfig support.
properties["decoding_config"] = {"type": ["object", "null"]}
return schema
Expand Down
6 changes: 6 additions & 0 deletions tensorrt_llm/commands/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!--
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->

Rules for the trtllm-serve CLI (`commands/serve.py`) are in `tensorrt_llm/serve/AGENTS.md`.
2 changes: 2 additions & 0 deletions tensorrt_llm/commands/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# In ./CLAUDE.md
@AGENTS.md
20 changes: 5 additions & 15 deletions tensorrt_llm/commands/_config_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import yaml
from pydantic import BaseModel

from tensorrt_llm.commands.serve_cli._serve_options import reserved_set_paths

_PATH_COMPONENT_RE = re.compile(r"^[a-z_][A-Za-z0-9_]*$")
_MAX_VALUE_DEPTH = 64
_MAX_VALUE_NODES = 10_000
Expand All @@ -42,21 +44,9 @@ class ConfigOverrideError(ValueError):
"""A safe-to-display error in a configuration override."""


_RESERVED_PATH_REASONS = {
("model",): "use the MODEL positional argument",
("backend",): "use --backend",
("telemetry_config",): "use --telemetry or --no-telemetry",
("env_overrides",): "set environment overrides in the YAML config",
("internal_request_auth_key",): "keep authentication keys in the YAML config",
("allow_request_chat_template",): "use --allow_request_chat_template",
("disagg_cluster",): "use --disagg_cluster_uri or the YAML config",
("batched_logits_processor",): "use the Python LLM API for live objects",
("checkpoint_loader",): "use the Python LLM API for live objects",
("mpi_session",): "use the Python LLM API for live objects",
("ray_placement_config", "placement_groups"): "use the Python LLM API for live objects",
("speculative_config", "drafter"): "use the Python LLM API for live objects",
("speculative_config", "resource_manager"): "use the Python LLM API for live objects",
}
# CLI-owned paths, the server-only YAML keys and the live-object paths, each with
# the reason shown when --set names it; declared in serve_cli/_serve_options.py.
_RESERVED_PATH_REASONS = reserved_set_paths()


def _format_path(path: Sequence[str]) -> str:
Expand Down
Loading
Loading