pub struct CachedModel {Show 13 fields
pub id: String,
pub provider: String,
pub provider_key: String,
pub release_date: Option<String>,
pub description: Option<String>,
pub context_window: Option<u64>,
pub max_output: Option<u64>,
pub cost_input: Option<f64>,
pub cost_output: Option<f64>,
pub cost_cache_read: Option<f64>,
pub cost_cache_write: Option<f64>,
pub cost_reasoning: Option<f64>,
pub reasoning: Option<ModelReasoningRow>,
}Expand description
One models.dev model.
Fields§
§id: String§provider: StringDisplay name (“Anthropic”, “xAI”).
provider_key: Stringmodels.dev’s own provider key (“anthropic”, “meta-llama”). meta and meta-llama
both display as “Meta”, so the key is what tells providers apart. Snapshots written
before it existed lack it; readers fill it with provider_key_from_display.
release_date: Option<String>§description: Option<String>§context_window: Option<u64>§max_output: Option<u64>§cost_input: Option<f64>§cost_output: Option<f64>§cost_cache_read: Option<f64>§cost_cache_write: Option<f64>§cost_reasoning: Option<f64>§reasoning: Option<ModelReasoningRow>None when models.dev says nothing about reasoning (rows from older snapshots).
Trait Implementations§
Source§impl Clone for CachedModel
impl Clone for CachedModel
Source§impl Debug for CachedModel
impl Debug for CachedModel
Source§impl Default for CachedModel
impl Default for CachedModel
Source§impl<'de> Deserialize<'de> for CachedModel
impl<'de> Deserialize<'de> for CachedModel
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 Forget for CachedModel
impl Freeze for CachedModel
impl Move for CachedModel
impl RefUnwindSafe for CachedModel
impl Send for CachedModelwhere
RawVecInner: Send,
impl Sync for CachedModelwhere
RawVecInner: Sync,
impl Unpin for CachedModel
impl UnsafeUnpin for CachedModelwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<ReasoningOption>: UnsafeUnpin,
impl UnwindSafe for CachedModelwhere
RawVecInner: UnwindSafe,
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