pub enum ClaudeModel {
Opus46,
Sonnet46,
Haiku45,
Opus45,
Sonnet45,
Opus41,
Opus4,
Sonnet4,
Custom(String),
}Expand description
Anthropic Claude model identifiers.
§Examples
use llm_toolkit::models::ClaudeModel;
// Use predefined models
let model = ClaudeModel::Opus46;
assert_eq!(model.as_api_id(), "claude-opus-4-6");
// Parse from string (shorthand or full name)
let model: ClaudeModel = "opus".parse().unwrap();
assert_eq!(model, ClaudeModel::Opus46);
// Custom model (validated)
let model: ClaudeModel = "claude-future-model-2027".parse().unwrap();Variants§
Opus46
Claude Opus 4.6 - Most intelligent, agents & coding (February 2026)
Sonnet46
Claude Sonnet 4.6 - Best speed/intelligence ratio (February 2026)
Haiku45
Claude Haiku 4.5 - Fastest, near-frontier intelligence (October 2025)
Opus45
Claude Opus 4.5 - Previous flagship (November 2025)
Sonnet45
Claude Sonnet 4.5 - Previous balanced (September 2025)
Opus41
Claude Opus 4.1 - Enhanced agentic (August 2025)
Opus4
Claude Opus 4 - Legacy flagship (May 2025)
Sonnet4
Claude Sonnet 4 - Legacy balanced (May 2025)
Custom(String)
Custom model (validated: must start with “claude-”)
Implementations§
Source§impl ClaudeModel
impl ClaudeModel
Trait Implementations§
Source§impl Clone for ClaudeModel
impl Clone for ClaudeModel
Source§fn clone(&self) -> ClaudeModel
fn clone(&self) -> ClaudeModel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClaudeModel
impl Debug for ClaudeModel
Source§impl Default for ClaudeModel
impl Default for ClaudeModel
Source§impl Display for ClaudeModel
impl Display for ClaudeModel
Source§impl From<ClaudeModel> for Model
impl From<ClaudeModel> for Model
Source§fn from(m: ClaudeModel) -> Self
fn from(m: ClaudeModel) -> Self
Converts to this type from the input type.
Source§impl FromStr for ClaudeModel
impl FromStr for ClaudeModel
Source§impl Hash for ClaudeModel
impl Hash for ClaudeModel
Source§impl PartialEq for ClaudeModel
impl PartialEq for ClaudeModel
impl Eq for ClaudeModel
impl StructuralPartialEq for ClaudeModel
Auto Trait Implementations§
impl Freeze for ClaudeModel
impl RefUnwindSafe for ClaudeModel
impl Send for ClaudeModel
impl Sync for ClaudeModel
impl Unpin for ClaudeModel
impl UnsafeUnpin for ClaudeModel
impl UnwindSafe for ClaudeModel
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