pub struct ModelFamilyCapabilities {
pub model_family: String,
pub supported_features: HashSet<ProviderFeature>,
pub max_cache_breakpoints: Option<u32>,
pub min_cacheable_tokens: Option<u32>,
pub cache_economics: Option<CacheEconomics>,
}Expand description
Per-model-family capability overrides within a backend.
Some features vary by model within the same backend (e.g., Claude 3.5 Sonnet supports 4 cache breakpoints while older models support fewer).
Fields§
§model_family: StringModel family identifier (e.g., “claude-3.5-sonnet”, “gpt-4o”).
supported_features: HashSet<ProviderFeature>Features supported by this model family.
max_cache_breakpoints: Option<u32>Maximum number of cache breakpoints (if applicable).
min_cacheable_tokens: Option<u32>Minimum tokens required for a block to be cacheable.
cache_economics: Option<CacheEconomics>Provider/model-specific cache economics for explicit cache planning.
Implementations§
Source§impl ModelFamilyCapabilities
impl ModelFamilyCapabilities
Sourcepub fn supports(&self, feature: ProviderFeature) -> bool
pub fn supports(&self, feature: ProviderFeature) -> bool
Check if this model family supports a specific feature.
Trait Implementations§
Source§impl Clone for ModelFamilyCapabilities
impl Clone for ModelFamilyCapabilities
Source§fn clone(&self) -> ModelFamilyCapabilities
fn clone(&self) -> ModelFamilyCapabilities
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelFamilyCapabilities
impl Debug for ModelFamilyCapabilities
Source§impl<'de> Deserialize<'de> for ModelFamilyCapabilities
impl<'de> Deserialize<'de> for ModelFamilyCapabilities
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ModelFamilyCapabilities
impl PartialEq for ModelFamilyCapabilities
Source§fn eq(&self, other: &ModelFamilyCapabilities) -> bool
fn eq(&self, other: &ModelFamilyCapabilities) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ModelFamilyCapabilities
impl Serialize for ModelFamilyCapabilities
impl StructuralPartialEq for ModelFamilyCapabilities
Auto Trait Implementations§
impl Freeze for ModelFamilyCapabilities
impl RefUnwindSafe for ModelFamilyCapabilities
impl Send for ModelFamilyCapabilities
impl Sync for ModelFamilyCapabilities
impl Unpin for ModelFamilyCapabilities
impl UnsafeUnpin for ModelFamilyCapabilities
impl UnwindSafe for ModelFamilyCapabilities
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more