[model-gateway] add --disable-health-check option to skip worker health probes (#17002)

This commit is contained in:
Ziwen Zhao
2026-01-13 17:28:32 -08:00
committed by GitHub
parent 5938c3b06a
commit cf25852a1d
17 changed files with 159 additions and 14 deletions
@@ -80,6 +80,10 @@ pub struct WorkerConfigRequest {
#[serde(default = "default_health_failure_threshold")]
pub health_failure_threshold: u32,
/// Disable periodic health checks for this worker (default: false)
#[serde(default)]
pub disable_health_check: bool,
/// Maximum connection attempts during worker registration (default: 20)
#[serde(default = "default_max_connection_attempts")]
pub max_connection_attempts: u32,
@@ -165,6 +169,9 @@ pub struct WorkerInfo {
#[serde(skip_serializing_if = "HashMap::is_empty")]
pub metadata: HashMap<String, String>,
/// Whether health checks are disabled for this worker
pub disable_health_check: bool,
/// Job status for async operations (if available)
#[serde(skip_serializing_if = "Option::is_none")]
pub job_status: Option<JobStatus>,
@@ -191,6 +198,7 @@ impl WorkerInfo {
chat_template: None,
bootstrap_port: None,
metadata: HashMap::new(),
disable_health_check: false,
job_status,
}
}
@@ -271,6 +279,10 @@ pub struct WorkerUpdateRequest {
/// Update health failure threshold
#[serde(skip_serializing_if = "Option::is_none")]
pub health_failure_threshold: Option<u32>,
/// Disable periodic health checks for this worker
#[serde(skip_serializing_if = "Option::is_none")]
pub disable_health_check: Option<bool>,
}
/// Generic API response