pub struct ModelInfo {
pub id: String,
pub name: String,
pub provider: String,
pub context_length: Option<u64>,
pub max_output: Option<u64>,
pub capabilities: Vec<String>,
pub pricing: Option<ModelPricing>,
}Expand description
Universal model info — same shape regardless of provider.
Fields§
§id: StringModel identifier (e.g. “anthropic/claude-sonnet-4-20250514”)
name: StringHuman-readable name (e.g. “Claude Sonnet 4”)
provider: StringProvider that serves this model (e.g. “anthropic”)
context_length: Option<u64>Maximum input context length in tokens
max_output: Option<u64>Maximum output tokens per request
capabilities: Vec<String>Model capabilities (e.g. [“chat”, “vision”, “tool_use”, “json_mode”])
pricing: Option<ModelPricing>Pricing information (per million tokens)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelInfo
impl<'de> Deserialize<'de> for ModelInfo
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
Auto Trait Implementations§
impl Freeze for ModelInfo
impl RefUnwindSafe for ModelInfo
impl Send for ModelInfo
impl Sync for ModelInfo
impl Unpin for ModelInfo
impl UnwindSafe for ModelInfo
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