pub enum Model {
Opus45,
Sonnet4,
Haiku35,
Sonnet35V2,
Unknown,
}Expand description
Claude model identifier.
Parsed from status line JSON: model.id field.
Variants§
Opus45
Claude Opus 4.5 (claude-opus-4-5-20251101)
Sonnet4
Claude Sonnet 4 (claude-sonnet-4-20250514)
Haiku35
Claude Haiku 3.5 (claude-3-5-haiku-20241022)
Sonnet35V2
Claude Sonnet 3.5 v2 (claude-3-5-sonnet-20241022)
Unknown
Unknown or future model
Implementations§
Source§impl Model
impl Model
Sourcepub fn display_name(&self) -> &'static str
pub fn display_name(&self) -> &'static str
Returns a human-readable display name.
Sourcepub fn context_window_size(&self) -> u32
pub fn context_window_size(&self) -> u32
Returns the context window size for this model.
Sourcepub fn input_cost_per_million(&self) -> f64
pub fn input_cost_per_million(&self) -> f64
Returns approximate cost per million input tokens (USD).
Sourcepub fn output_cost_per_million(&self) -> f64
pub fn output_cost_per_million(&self) -> f64
Returns approximate cost per million output tokens (USD).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Model
impl<'de> Deserialize<'de> for Model
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
impl Copy for Model
impl Eq for Model
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
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