diff --git a/libs/models/agents/mod.rs b/libs/models/agents/mod.rs index dbd3eee..aa1f970 100644 --- a/libs/models/agents/mod.rs +++ b/libs/models/agents/mod.rs @@ -67,12 +67,15 @@ impl std::str::FromStr for ModelCapability { } } -/// Model or model-version availability status. Stored as `"active"` or -/// `"deprecated"`. +/// Model or model-version availability status. #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub enum ModelStatus { + /// Model is available and can be used. Active, + /// Model is no longer available from the provider. Deprecated, + /// Model was not found in the last upstream sync (offline). + Offline, } impl std::fmt::Display for ModelStatus { @@ -80,6 +83,7 @@ impl std::fmt::Display for ModelStatus { match self { ModelStatus::Active => write!(f, "active"), ModelStatus::Deprecated => write!(f, "deprecated"), + ModelStatus::Offline => write!(f, "offline"), } } } @@ -90,6 +94,7 @@ impl std::str::FromStr for ModelStatus { match s { "active" => Ok(ModelStatus::Active), "deprecated" => Ok(ModelStatus::Deprecated), + "offline" => Ok(ModelStatus::Offline), _ => Err("unknown model status"), } }