pub struct ModelInfo {
pub id: String,
pub name: Option<String>,
pub context_length: Option<u64>,
pub pricing_prompt: Option<f64>,
pub pricing_completion: Option<f64>,
}Expand description
Rich model metadata returned by fetch_models_detailed.
Fields§
§id: StringProvider-specific model ID (e.g. anthropic/claude-opus-4-20250514).
name: Option<String>Human-readable name (if available from the API).
context_length: Option<u64>Context window size in tokens (if available).
pricing_prompt: Option<f64>Price per prompt/input token in USD (if available).
pricing_completion: Option<f64>Price per completion/output token in USD (if available).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelInfo
impl RefUnwindSafe for ModelInfo
impl Send for ModelInfo
impl Sync for ModelInfo
impl Unpin for ModelInfo
impl UnsafeUnpin 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