Skip to content
Merged
73 changes: 73 additions & 0 deletions rust/src/cmd/src/cli/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,79 @@ fn frontend_args_json_aggregates_multiple_unsupported_fields() {
"#]].assert_eq(&actual);
}

/// Python args that have no meaningful Rust equivalent are accepted on both the
/// `vllm-rs serve` and the `--args-json` paths.
#[test]
fn noop_args_are_accepted() {
Cli::try_parse_from([
"vllm-rs",
"serve",
"Qwen/Qwen3-0.6B",
"--disable-fastapi-docs",
])
.expect("--disable-fastapi-docs is accepted");

Cli::try_parse_from([
"vllm-rs",
"frontend",
"--listen-fd",
"3",
"--input-listener-fd",
"999999",
"--output-listener-fd",
"999998",
"--args-json",
r#"{"model_tag":"Qwen/Qwen3-0.6B","disable_fastapi_docs":true}"#,
])
.expect("disable_fastapi_docs is accepted");
}

/// Frontend-read Python args that Rust recognizes but does not support yet must
/// fail startup on both the `vllm-rs serve` and the `--args-json` paths.
#[test]
fn unsupported_args_fail_startup() {
let cases = [
(
"--custom-histogram-buckets",
r#"{"request_latency":[0.1,1.0]}"#,
"custom_histogram_buckets",
),
(
"--enable-tower-connector-lora",
"true",
"enable_tower_connector_lora",
),
("--enable-elastic-ep", "true", "enable_elastic_ep"),
];
for (flag, value, key) in cases {
let error = Cli::try_parse_from(["vllm-rs", "serve", "Qwen/Qwen3-0.6B", flag, value])
.unwrap_err()
.to_string();
assert!(
error.contains("argument is not implemented in Rust frontend yet"),
"{flag}: {error}"
);

let args_json =
serde_json::json!({ "model_tag": "Qwen/Qwen3-0.6B", key: value }).to_string();
let error = Cli::try_parse_from([
"vllm-rs",
"frontend",
"--listen-fd",
"3",
"--input-listener-fd",
"999999",
"--output-listener-fd",
"999998",
"--args-json",
&args_json,
])
.unwrap_err()
.to_string();
assert!(error.contains(&format!("- {key}\n")), "{key}: {error}");
}
}

#[test]
fn frontend_args_json_rejects_malformed_json() {
let error = Cli::try_parse_from([
Expand Down
36 changes: 34 additions & 2 deletions rust/src/cmd/src/cli/unsupported.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,15 @@ pub struct EngineUnsupportedArgs {
)]
pub enable_fault_tolerance: Option<Unsupported>,

/// Enable elastic expert parallelism with stateless NCCL groups for DP/EP.
#[arg(
long,
visible_alias = "no-enable-elastic-ep",
default_missing_value = "true",
num_args = 0..=1
)]
pub enable_elastic_ep: Option<Unsupported>,

/// This feature is work in progress and no prefill optimization takes place
/// with this flag enabled currently.
#[arg(
Expand All @@ -308,6 +317,17 @@ pub struct EngineUnsupportedArgs {
)]
pub kv_sharing_fast_prefill: Option<Unsupported>,

/// If `True`, LoRA support for the tower (vision encoder) and connector
/// of multimodal models will be enabled. This is an experimental feature
/// and currently only supports some MM models such as the Qwen VL series.
#[arg(
long,
visible_alias = "no-enable-tower-connector-lora",
default_missing_value = "true",
num_args = 0..=1
)]
pub enable_tower_connector_lora: Option<Unsupported>,

/// Additional args passed to process media inputs, keyed by modalities.
#[arg(long)]
pub media_io_kwargs: Option<Unsupported>,
Expand Down Expand Up @@ -359,6 +379,14 @@ pub struct EngineUnsupportedArgs {
#[arg(long)]
pub collect_detailed_traces: Option<Unsupported>,

/// Custom Prometheus histogram bucket boundaries, as a JSON mapping from
/// bucket-family key to a list of strictly increasing, positive, finite
/// upper bounds. When a family key is present, its list replaces the
/// default buckets for every histogram in that family; families not listed
/// keep their defaults.
#[arg(long)]
pub custom_histogram_buckets: Option<Unsupported>,

/// Maximum number of requests that can be in-flight (waiting or running)
/// at the same time. When the limit is reached, new requests are rejected
/// with HTTP 503 so the client can retry on another instance.
Expand Down Expand Up @@ -601,13 +629,17 @@ pub struct ServerUnsupportedArgs {
pub middleware: Option<Unsupported>,

/// Disable FastAPI's OpenAPI schema, Swagger UI, and ReDoc endpoint.
///
/// Accepted as a no-op: the Rust frontend does not serve these docs
/// endpoints at all.
#[arg(
long,
visible_alias = "no-disable-fastapi-docs",
default_missing_value = "true",
num_args = 0..=1
num_args = 0..=1,
hide = true
)]
pub disable_fastapi_docs: Option<Unsupported>,
pub disable_fastapi_docs: Option<Noop>,

/// Maximum size (bytes) of an incomplete HTTP event (header or body) for
/// h11 parser. Helps mitigate header abuse. Default: 4194304 (4 MB).
Expand Down
Loading