pub enum ClaudeModel {
Show 27 variants
Sonnet,
Opus,
Haiku,
Fable,
Best,
OpusPlan,
Sonnet1m,
Opus1m,
Fable1m,
Fable5,
Mythos5,
Opus5,
Opus48,
Opus47,
Opus46,
Opus45,
Opus41,
Opus40,
Sonnet5,
Sonnet46,
Sonnet45,
Sonnet40,
Sonnet37,
Sonnet35,
Haiku45,
Haiku35,
Custom(String),
}Expand description
A model selector accepted by claude --model.
Variants§
Sonnet
Newest Sonnet-family model (floating alias sonnet).
Opus
Newest Opus-family model (floating alias opus). Resolves to
claude-opus-5 first-party as of CLI 2.1.219.
Haiku
Newest Haiku-family model (floating alias haiku).
Fable
Newest Fable-family model (floating alias fable).
Best
The most capable model available to the account (alias best).
OpusPlan
Opus for plan mode, Sonnet otherwise (alias opusplan).
Sonnet1m
Newest Sonnet with the 1M-token context beta (alias sonnet[1m]).
Opus1m
Newest Opus with the 1M-token context beta (alias opus[1m]).
Fable1m
Newest Fable with the 1M-token context beta (alias fable[1m]).
Fable5
Fable 5 (claude-fable-5).
Mythos5
Mythos 5 (claude-mythos-5).
Opus5
Opus 5 (claude-opus-5).
Opus48
Opus 4.8 (claude-opus-4-8).
Opus47
Opus 4.7 (claude-opus-4-7).
Opus46
Opus 4.6 (claude-opus-4-6).
Opus45
Opus 4.5 (claude-opus-4-5).
Opus41
Opus 4.1 (claude-opus-4-1).
Opus40
Opus 4 (claude-opus-4-0).
Sonnet5
Sonnet 5 (claude-sonnet-5).
Sonnet46
Sonnet 4.6 (claude-sonnet-4-6).
Sonnet45
Sonnet 4.5 (claude-sonnet-4-5).
Sonnet40
Sonnet 4 (claude-sonnet-4-0).
Sonnet37
Sonnet 3.7 (claude-3-7-sonnet).
Sonnet35
Sonnet 3.5 (claude-3-5-sonnet).
Haiku45
Haiku 4.5 (claude-haiku-4-5).
Haiku35
Haiku 3.5 (claude-3-5-haiku).
Custom(String)
A model string not yet known to this version of the crate. Passed to the CLI verbatim.
Implementations§
Source§impl ClaudeModel
impl ClaudeModel
Sourcepub fn display_name(&self) -> &str
pub fn display_name(&self) -> &str
Human-friendly display name, matching what the CLI’s own UI renders.
Sourcepub fn is_alias(&self) -> bool
pub fn is_alias(&self) -> bool
True for the floating aliases (sonnet, opus, …) that the CLI
resolves to the newest model of the family at session start.
Sourcepub fn known() -> &'static [ClaudeModel]
pub fn known() -> &'static [ClaudeModel]
Every model known to this version of the crate, aliases first.
Trait Implementations§
Source§impl Clone for ClaudeModel
impl Clone for ClaudeModel
Source§fn clone(&self) -> ClaudeModel
fn clone(&self) -> ClaudeModel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more