pub struct BuiltinModelEntry {Show 14 fields
pub id: String,
pub name: String,
pub api: String,
pub provider: String,
pub reasoning: bool,
pub input: Vec<String>,
pub cost_input: f64,
pub cost_output: f64,
pub cost_cache_read: f64,
pub cost_cache_write: f64,
pub context_window: u32,
pub max_tokens: u32,
pub auth_method: AuthMethod,
pub base_url: Option<String>,
}Expand description
Produced by crate::catalog::materialize::materialize from the
models.dev catalog. The TOML-based path that previously populated
these entries has been removed.
Fields§
§id: StringModel identifier (e.g., “claude-sonnet-4-20250514”)
name: StringHuman-readable model name (e.g., “Claude Sonnet 4”)
api: StringAPI protocol to use
provider: StringProvider name (e.g., “anthropic”, “openai”)
reasoning: boolWhether this model supports reasoning/thinking
input: Vec<String>Supported input modalities
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)
context_window: u32Maximum context window in tokens
max_tokens: u32Maximum output tokens
auth_method: AuthMethodAuthentication method (overrides provider default).
base_url: Option<String>Per-model base URL override (None = inherit from provider).
Implementations§
Source§impl BuiltinModelEntry
impl BuiltinModelEntry
Sourcepub fn supports_vision(&self) -> bool
pub fn supports_vision(&self) -> bool
Check if this model supports image/vision input.
Sourcepub fn supports_reasoning(&self) -> bool
pub fn supports_reasoning(&self) -> bool
Check if this model supports reasoning/thinking.
Trait Implementations§
Source§impl Clone for BuiltinModelEntry
impl Clone for BuiltinModelEntry
Source§fn clone(&self) -> BuiltinModelEntry
fn clone(&self) -> BuiltinModelEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BuiltinModelEntry
impl Debug for BuiltinModelEntry
Source§impl<'de> Deserialize<'de> for BuiltinModelEntry
impl<'de> Deserialize<'de> for BuiltinModelEntry
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BuiltinModelEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BuiltinModelEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<&BuiltinModelEntry> for ModelEntry
impl From<&BuiltinModelEntry> for ModelEntry
Source§fn from(e: &BuiltinModelEntry) -> ModelEntry
fn from(e: &BuiltinModelEntry) -> ModelEntry
Source§impl Serialize for BuiltinModelEntry
impl Serialize for BuiltinModelEntry
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for BuiltinModelEntry
impl RefUnwindSafe for BuiltinModelEntry
impl Send for BuiltinModelEntry
impl Sync for BuiltinModelEntry
impl Unpin for BuiltinModelEntry
impl UnsafeUnpin for BuiltinModelEntry
impl UnwindSafe for BuiltinModelEntry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.