@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 87b98d6d6c
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

[Rust Frontend][Bugfix] Forward --shutdown-timeout and --disable-log-stats to the managed Python engine (#45300)

Signed-off-by: Will Eaton <weaton@redhat.com>

Will Eaton committed Jun 12, 2026 at 03:39 UTC 87b98d6d6cd91768b81e614e0d34d3e7e487dc50
3 files changed +47
rust/src/cmd/src/cli.rs
+2
@@ -468,6 +468,8 @@ impl ServeArgs {
468 self.runtime.model.clone(),
469 self.runtime.max_model_len,
470 self.runtime.language_model_only,
471 + self.runtime.disable_log_stats,
472 + self.runtime.shutdown_timeout,
473 handshake_port,
474 )
475 }
rust/src/cmd/src/cli/tests.rs
+34
@@ -100,6 +100,40 @@ fn serve_args_auto_forward_enable_lora_to_python() {
100 assert_eq!(args.managed_engine.python_args, vec!["--enable-lora"]);
101 }
102
103 +#[test]
104 +fn serve_args_forward_shutdown_timeout_to_managed_engine() {
105 + let cli = Cli::try_parse_from([
106 + "vllm-rs",
107 + "serve",
108 + "Qwen/Qwen3-0.6B",
109 + "--shutdown-timeout",
110 + "60",
111 + ])
112 + .unwrap();
113 +
114 + let Command::Serve(args) = cli.command else {
115 + panic!("expected serve args");
116 + };
117 + assert_eq!(args.runtime.shutdown_timeout, 60);
118 +
119 + let config = args.to_managed_engine_config(5555);
120 + assert_eq!(config.python_args, vec!["--shutdown-timeout", "60"]);
121 +}
122 +
123 +#[test]
124 +fn serve_args_forward_disable_log_stats_to_managed_engine() {
125 + let cli = Cli::try_parse_from(["vllm-rs", "serve", "Qwen/Qwen3-0.6B", "--disable-log-stats"])
126 + .unwrap();
127 +
128 + let Command::Serve(args) = cli.command else {
129 + panic!("expected serve args");
130 + };
131 + assert!(args.runtime.disable_log_stats);
132 +
133 + let config = args.to_managed_engine_config(5555);
134 + assert_eq!(config.python_args, vec!["--disable-log-stats"]);
135 +}
136 +
137 #[test]
138 fn serve_args_auto_forward_python_multi_char_alias_without_separator() {
139 let cli = Cli::try_parse_from(["vllm-rs", "serve", "Qwen/Qwen3-0.6B", "-tp", "2"]).unwrap();
rust/src/managed-engine/src/cli.rs
+11
@@ -72,6 +72,8 @@ impl ManagedEngineArgs {
72 model: String,
73 max_model_len: Option<u32>,
74 language_model_only: bool,
75 + disable_log_stats: bool,
76 + shutdown_timeout: u64,
77 handshake_port: u16,
78 ) -> ManagedEngineConfig {
79 let mut python_args = self.python_args;
@@ -83,6 +85,15 @@ impl ManagedEngineArgs {
85 if language_model_only {
86 python_args.push("--language-model-only".to_string());
87 }
88 + if disable_log_stats {
89 + python_args.push("--disable-log-stats".to_string());
90 + }
91 + // we must pass through shutdown_timeout to the engine,
92 + // otherwise inflight requests get aborted on shutdown
93 + if shutdown_timeout > 0 {
94 + python_args.push("--shutdown-timeout".to_string());
95 + python_args.push(shutdown_timeout.to_string());
96 + }
97 if let Some(data_parallel_size_local) = self.data_parallel_size_local {
98 python_args.push("--data-parallel-size-local".to_string());
99 python_args.push(data_parallel_size_local.to_string());