pub enum LlmModel {
Anthropic(AnthropicModel),
Codex(CodexModel),
DeepSeek(DeepSeekModel),
Gemini(GeminiModel),
Moonshot(MoonshotModel),
Openai(OpenaiModel),
OpenRouter(OpenRouterModel),
ZAi(ZAiModel),
Bedrock(BedrockModel),
Ollama(String),
LlamaCpp(String),
}Expand description
A model from a specific provider
Variants§
Anthropic(AnthropicModel)
Codex(CodexModel)
DeepSeek(DeepSeekModel)
Gemini(GeminiModel)
Moonshot(MoonshotModel)
Openai(OpenaiModel)
OpenRouter(OpenRouterModel)
ZAi(ZAiModel)
Bedrock(BedrockModel)
Ollama(String)
LlamaCpp(String)
Implementations§
Source§impl LlmModel
impl LlmModel
Sourcepub const ALL_REQUIRED_ENV_VARS: &[&str]
pub const ALL_REQUIRED_ENV_VARS: &[&str]
All provider API key env var names (deduplicated, static)
Sourcepub fn display_name(&self) -> Cow<'static, str>
pub fn display_name(&self) -> Cow<'static, str>
Human-readable display name (e.g. Claude Opus 4.6)
Sourcepub fn provider_display_name(&self) -> &'static str
pub fn provider_display_name(&self) -> &'static str
Human-readable provider name (e.g. AWS Bedrock)
Sourcepub fn context_window(&self) -> Option<u32>
pub fn context_window(&self) -> Option<u32>
Context window size in tokens (None for dynamic providers)
Sourcepub fn required_env_var(&self) -> Option<&'static str>
pub fn required_env_var(&self) -> Option<&'static str>
Required env var for this model’s provider (None for local providers)
Sourcepub fn oauth_provider_id(&self) -> Option<&'static str>
pub fn oauth_provider_id(&self) -> Option<&'static str>
OAuth provider ID if this model requires OAuth login (e.g. "codex")
Sourcepub fn reasoning_levels(&self) -> &'static [ReasoningEffort]
pub fn reasoning_levels(&self) -> &'static [ReasoningEffort]
Reasoning levels supported by this model (empty if not a reasoning model)
Sourcepub fn supports_reasoning(&self) -> bool
pub fn supports_reasoning(&self) -> bool
Whether this model supports reasoning/extended thinking
Sourcepub fn supports_image(&self) -> bool
pub fn supports_image(&self) -> bool
Whether this model supports image input
Sourcepub fn supports_audio(&self) -> bool
pub fn supports_audio(&self) -> bool
Whether this model supports audio input
Trait Implementations§
Source§impl From<AnthropicModel> for LlmModel
impl From<AnthropicModel> for LlmModel
Source§fn from(m: AnthropicModel) -> Self
fn from(m: AnthropicModel) -> Self
Converts to this type from the input type.
Source§impl From<BedrockModel> for LlmModel
impl From<BedrockModel> for LlmModel
Source§fn from(m: BedrockModel) -> Self
fn from(m: BedrockModel) -> Self
Converts to this type from the input type.
Source§impl From<CodexModel> for LlmModel
impl From<CodexModel> for LlmModel
Source§fn from(m: CodexModel) -> Self
fn from(m: CodexModel) -> Self
Converts to this type from the input type.
Source§impl From<DeepSeekModel> for LlmModel
impl From<DeepSeekModel> for LlmModel
Source§fn from(m: DeepSeekModel) -> Self
fn from(m: DeepSeekModel) -> Self
Converts to this type from the input type.
Source§impl From<GeminiModel> for LlmModel
impl From<GeminiModel> for LlmModel
Source§fn from(m: GeminiModel) -> Self
fn from(m: GeminiModel) -> Self
Converts to this type from the input type.
Source§impl From<MoonshotModel> for LlmModel
impl From<MoonshotModel> for LlmModel
Source§fn from(m: MoonshotModel) -> Self
fn from(m: MoonshotModel) -> Self
Converts to this type from the input type.
Source§impl From<OpenRouterModel> for LlmModel
impl From<OpenRouterModel> for LlmModel
Source§fn from(m: OpenRouterModel) -> Self
fn from(m: OpenRouterModel) -> Self
Converts to this type from the input type.
Source§impl From<OpenaiModel> for LlmModel
impl From<OpenaiModel> for LlmModel
Source§fn from(m: OpenaiModel) -> Self
fn from(m: OpenaiModel) -> Self
Converts to this type from the input type.
impl Eq for LlmModel
impl StructuralPartialEq for LlmModel
Auto Trait Implementations§
impl Freeze for LlmModel
impl RefUnwindSafe for LlmModel
impl Send for LlmModel
impl Sync for LlmModel
impl Unpin for LlmModel
impl UnsafeUnpin for LlmModel
impl UnwindSafe for LlmModel
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
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§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
Compare self to
key and return true if they are equal.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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.