pub enum AgentModel {
Opus,
Sonnet,
Haiku,
}Expand description
A selectable model tier for a code agent. The variants currently encode the
Claude tiers (the only supported agent); the id doubles as the CLI
--model value — a stable alias that resolves to the latest model of that
tier — so labels can track the current family without breaking selection.
Variants§
Opus
Most capable, highest latency (Claude Opus).
Sonnet
Balanced capability and speed (Claude Sonnet) — the default.
Haiku
Fastest and lightest (Claude Haiku).
Implementations§
Source§impl AgentModel
impl AgentModel
Sourcepub fn all() -> &'static [AgentModel]
pub fn all() -> &'static [AgentModel]
Every selectable model, in display and cycle order.
Sourcepub fn id(self) -> &'static str
pub fn id(self) -> &'static str
The stable lowercase identifier, used both in config/flags and as the
agent CLI’s --model value (e.g. "sonnet").
Sourcepub fn label(self) -> &'static str
pub fn label(self) -> &'static str
A human-readable label for the status display; tracks the current model
family (the id alias always selects the latest of that tier).
Sourcepub fn parse(s: &str) -> Option<AgentModel>
pub fn parse(s: &str) -> Option<AgentModel>
Parses a model identifier (case-insensitive: opus/sonnet/haiku),
returning None if unknown.
Sourcepub fn next(self) -> AgentModel
pub fn next(self) -> AgentModel
The next model in cycle order (wraps), for the TUI’s Ctrl-M picker.
Sourcepub fn prev(self) -> AgentModel
pub fn prev(self) -> AgentModel
The previous model in cycle order (wraps), for navigating the TUI’s
model dropdown upward (↑).
Trait Implementations§
Source§impl Clone for AgentModel
impl Clone for AgentModel
Source§fn clone(&self) -> AgentModel
fn clone(&self) -> AgentModel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AgentModel
Source§impl Debug for AgentModel
impl Debug for AgentModel
Source§impl Default for AgentModel
impl Default for AgentModel
Source§fn default() -> AgentModel
fn default() -> AgentModel
impl Eq for AgentModel
Source§impl PartialEq for AgentModel
impl PartialEq for AgentModel
Source§fn eq(&self, other: &AgentModel) -> bool
fn eq(&self, other: &AgentModel) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for AgentModel
impl Serialize for AgentModel
impl StructuralPartialEq for AgentModel
Auto Trait Implementations§
impl Freeze for AgentModel
impl RefUnwindSafe for AgentModel
impl Send for AgentModel
impl Sync for AgentModel
impl Unpin for AgentModel
impl UnsafeUnpin for AgentModel
impl UnwindSafe for AgentModel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more