[Rust Frontend] Forward `VLLM_ENGINE_READY_TIMEOUT_S` via `--args-json` (#44610)
Signed-off-by: kai <kai@example.com> Co-authored-by: 图灵 <tuling.wk@alibaba-inc.com>
Kai committed
Jun 25, 2026 at 15:25 UTC
9b215ae60b523df34fd949598e657c2b26ea879a
1 file changed
+16
-12
vllm/v1/utils.py
+16
-12
@@ -365,19 +365,23 @@ class RustFrontendProcessManager:
365
cmd.extend(["--coordinator-address", stats_update_address])
366
from vllm.entrypoints.serve.utils.api_utils import jsonify_non_default_args
367
368
- args_json = json.dumps(
369
- jsonify_non_default_args(
370
- args,
371
- exclude={
372
- "api_server_count",
373
- # Python passes the bootstrapped engine range explicitly.
374
- "data_parallel_rank",
375
- "data_parallel_external_lb",
376
- "data_parallel_hybrid_lb",
377
- },
378
- ),
379
- sort_keys=True,
368
+ args_dict = jsonify_non_default_args(
369
+ args,
370
+ exclude={
371
+ "api_server_count",
372
+ # Python passes the bootstrapped engine range explicitly.
373
+ "data_parallel_rank",
374
+ "data_parallel_external_lb",
375
+ "data_parallel_hybrid_lb",
376
+ },
377
)
378
+ # The Rust `frontend` subcommand parses --args-json via serde_json,
379
+ # which bypasses clap and therefore ignores any `#[arg(env = ...)]`
380
+ # declarations on SharedRuntimeArgs fields. Forward the env-driven
381
+ # ready timeout explicitly so VLLM_ENGINE_READY_TIMEOUT_S behaves the
382
+ # same on both Python and Rust frontends.
383
+ args_dict["engine_ready_timeout_secs"] = envs.VLLM_ENGINE_READY_TIMEOUT_S
384
+ args_json = json.dumps(args_dict, sort_keys=True)
385
cmd.extend(["--args-json", args_json])
386
387
logger.info("Launching Rust frontend: %s", " ".join(cmd))