pub struct BackendCapabilities {
pub backend_id: String,
pub supported_features: HashSet<ProviderFeature>,
pub model_families: HashMap<String, ModelFamilyCapabilities>,
}Expand description
Capabilities of a specific backend provider.
Two-level model: backend-level defaults plus per-model-family overrides. Feature lookup checks model-family first, falls back to backend-level.
Fields§
§backend_id: StringBackend identifier (e.g., “anthropic”, “openai”, “passthrough”).
supported_features: HashSet<ProviderFeature>Backend-level supported features (default for all models).
model_families: HashMap<String, ModelFamilyCapabilities>Per-model-family capability overrides.
Implementations§
Source§impl BackendCapabilities
impl BackendCapabilities
Sourcepub fn none(backend_id: &str) -> Self
pub fn none(backend_id: &str) -> Self
Create capabilities with no features (used by passthrough plugin).
Sourcepub fn supports(&self, feature: ProviderFeature) -> bool
pub fn supports(&self, feature: ProviderFeature) -> bool
Check if the backend supports a feature at the backend level.
Sourcepub fn model_supports(
&self,
model_family: &str,
feature: ProviderFeature,
) -> bool
pub fn model_supports( &self, model_family: &str, feature: ProviderFeature, ) -> bool
Check if a specific model family supports a feature.
Falls back to backend-level if the model family is not registered.
Sourcepub fn add_model_family(&mut self, caps: ModelFamilyCapabilities)
pub fn add_model_family(&mut self, caps: ModelFamilyCapabilities)
Add a model family capability override.
Trait Implementations§
Source§impl Clone for BackendCapabilities
impl Clone for BackendCapabilities
Source§fn clone(&self) -> BackendCapabilities
fn clone(&self) -> BackendCapabilities
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 BackendCapabilities
impl Debug for BackendCapabilities
Source§impl<'de> Deserialize<'de> for BackendCapabilities
impl<'de> Deserialize<'de> for BackendCapabilities
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 BackendCapabilities
impl PartialEq for BackendCapabilities
Source§fn eq(&self, other: &BackendCapabilities) -> bool
fn eq(&self, other: &BackendCapabilities) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BackendCapabilities
impl Serialize for BackendCapabilities
impl StructuralPartialEq for BackendCapabilities
Auto Trait Implementations§
impl Freeze for BackendCapabilities
impl RefUnwindSafe for BackendCapabilities
impl Send for BackendCapabilities
impl Sync for BackendCapabilities
impl Unpin for BackendCapabilities
impl UnsafeUnpin for BackendCapabilities
impl UnwindSafe for BackendCapabilities
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