pub struct ModelInfo {
pub id: String,
pub name: String,
pub api: String,
pub provider: String,
pub reasoning: bool,
pub input: Vec<InputModality>,
pub context_window: u32,
pub max_tokens: u32,
pub cost_input: f64,
pub cost_output: f64,
pub cost_cache_read: f64,
pub cost_cache_write: f64,
}Expand description
Summary of a model from the catalog.
Fields§
§id: StringFull model ID: “provider/model-id”.
name: StringHuman-readable model name.
api: StringAPI protocol used by the model’s provider.
provider: StringProvider name.
reasoning: boolWhether this model supports reasoning/thinking.
input: Vec<InputModality>Supported input modalities.
context_window: u32Maximum context window in tokens.
max_tokens: u32Maximum output tokens.
cost_input: f64Cost per million input tokens (USD).
cost_output: f64Cost per million output tokens (USD).
cost_cache_read: f64Cost per million cached read tokens (USD).
cost_cache_write: f64Cost per million cached write tokens (USD).
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
Source§impl From<&ModelEntry> for ModelInfo
impl From<&ModelEntry> for ModelInfo
Source§fn from(entry: &ModelEntry) -> Self
fn from(entry: &ModelEntry) -> Self
Converts to this type from the input type.
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