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
A single built-in model entry.
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 more