pub struct ModelFamily {Show 17 fields
pub slug: String,
pub family: String,
pub provider: Provider,
pub context_window: Option<i64>,
pub auto_compact_token_limit: Option<i64>,
pub supports_reasoning_summaries: bool,
pub default_reasoning_effort: Option<ReasoningEffortLevel>,
pub supports_parallel_tool_calls: bool,
pub needs_special_apply_patch_instructions: bool,
pub shell_type: ShellToolType,
pub truncation_policy: TruncationPolicy,
pub experimental_supported_tools: Vec<String>,
pub effective_context_window_percent: i64,
pub support_verbosity: bool,
pub supports_tool_use: bool,
pub supports_streaming: bool,
pub supports_thinking: bool,
}Expand description
A model family groups models that share certain characteristics.
Fields§
§slug: StringThe full model slug used to derive this model family
family: StringThe model family name (e.g., “gemini-2.5”, “claude-opus”)
provider: ProviderThe provider this model belongs to
context_window: Option<i64>Maximum supported context window, if known
auto_compact_token_limit: Option<i64>Token threshold for automatic compaction
supports_reasoning_summaries: boolWhether the model supports reasoning summaries
default_reasoning_effort: Option<ReasoningEffortLevel>Default reasoning effort for this model family
supports_parallel_tool_calls: boolWhether the model supports parallel tool calls
needs_special_apply_patch_instructions: boolWhether the model needs special apply_patch instructions
shell_type: ShellToolTypePreferred shell tool type for this model family
truncation_policy: TruncationPolicyTruncation policy for model output
experimental_supported_tools: Vec<String>Names of experimental tools supported by this model family
effective_context_window_percent: i64Percentage of context window considered usable for inputs
support_verbosity: boolWhether the model supports verbosity settings
supports_tool_use: boolWhether the model supports tool use
supports_streaming: boolWhether the model supports streaming
supports_thinking: boolWhether the model supports thinking/reasoning output
Implementations§
Source§impl ModelFamily
impl ModelFamily
Sourcepub fn new(
slug: impl Into<String>,
family: impl Into<String>,
provider: Provider,
) -> Self
pub fn new( slug: impl Into<String>, family: impl Into<String>, provider: Provider, ) -> Self
Create a new model family with the given slug
Sourcepub fn auto_compact_token_limit(&self) -> Option<i64>
pub fn auto_compact_token_limit(&self) -> Option<i64>
Get the auto-compact token limit, computing a default if not set
Sourcepub fn get_model_slug(&self) -> &str
pub fn get_model_slug(&self) -> &str
Get the model slug
Sourcepub fn supports_feature(&self, feature: &str) -> bool
pub fn supports_feature(&self, feature: &str) -> bool
Check if this family supports a specific feature
Trait Implementations§
Source§impl Clone for ModelFamily
impl Clone for ModelFamily
Source§fn clone(&self) -> ModelFamily
fn clone(&self) -> ModelFamily
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ModelFamily
impl Debug for ModelFamily
Source§impl Default for ModelFamily
impl Default for ModelFamily
Source§impl<'de> Deserialize<'de> for ModelFamily
impl<'de> Deserialize<'de> for ModelFamily
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ModelFamily
impl PartialEq for ModelFamily
Source§fn eq(&self, other: &ModelFamily) -> bool
fn eq(&self, other: &ModelFamily) -> bool
self and other values to be equal, and is used by ==.