pub enum Provider {
Show 20 variants
Gemini,
OpenAI,
Anthropic,
Copilot,
DeepSeek,
OpenRouter,
Ollama,
LmStudio,
LlamaCpp,
Moonshot,
ZAI,
Minimax,
MiMo,
Mistral,
HuggingFace,
OpenCodeZen,
OpenCodeGo,
Qwen,
StepFun,
Poolside,
}Expand description
Supported AI model providers
Variants§
Gemini
Google Gemini models
OpenAI
OpenAI GPT models
Anthropic
Anthropic Claude models
Copilot
GitHub Copilot preview integration
DeepSeek
DeepSeek native models
OpenRouter
OpenRouter marketplace models
Ollama
Local Ollama models
LmStudio
LM Studio local models
LlamaCpp
llama.cpp local models
Moonshot
Moonshot.ai models
ZAI
Z.AI GLM models
Minimax
MiniMax models
MiMo
Xiaomi MiMo models
Mistral
Mistral AI models
HuggingFace
Hugging Face Inference Providers
OpenCodeZen
OpenCode Zen gateway (pay-as-you-go)
OpenCodeGo
OpenCode Go subscription
Qwen
Alibaba Cloud Qwen models
StepFun
StepFun models
Poolside
Poolside AI models
Implementations§
Source§impl Provider
impl Provider
Sourcepub fn default_api_key_env(&self) -> &'static str
pub fn default_api_key_env(&self) -> &'static str
Get the default API key environment variable for this provider
Sourcepub fn all_providers() -> Vec<Provider>
pub fn all_providers() -> Vec<Provider>
Get all supported providers
pub fn is_dynamic(&self) -> bool
pub fn is_local(&self) -> bool
pub fn local_install_instructions(&self) -> Option<&'static str>
Sourcepub fn supports_reasoning_effort(&self, model: &str) -> bool
pub fn supports_reasoning_effort(&self, model: &str) -> bool
Determine if the provider supports configurable reasoning effort for the model
Sourcepub fn supports_service_tier(&self, model: &str) -> bool
pub fn supports_service_tier(&self, model: &str) -> bool
Determine if the provider supports the service_tier request parameter for the model.
pub fn uses_managed_auth(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Provider
impl<'de> Deserialize<'de> for Provider
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>,
Source§impl JsonSchema for Provider
impl JsonSchema for Provider
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl Copy for Provider
impl Eq for Provider
impl StructuralPartialEq for Provider
Auto Trait Implementations§
impl Freeze for Provider
impl RefUnwindSafe for Provider
impl Send for Provider
impl Sync for Provider
impl Unpin for Provider
impl UnsafeUnpin for Provider
impl UnwindSafe for Provider
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<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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read moreSource§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.