pub enum ProviderKind {
Show 47 variants
Deepseek,
DeepseekAnthropic,
NvidiaNim,
Openai,
Atlascloud,
WanjieArk,
Volcengine,
Openrouter,
Orcarouter,
XiaomiMimo,
Novita,
Fireworks,
Siliconflow,
Arcee,
SiliconflowCN,
Moonshot,
Sglang,
Vllm,
Ollama,
OllamaCloud,
Huggingface,
Together,
Qianfan,
OpenaiCodex,
Anthropic,
Openmodel,
Zai,
Stepfun,
Minimax,
MinimaxAnthropic,
Deepinfra,
Sakana,
LongCat,
OpencodeGo,
OpencodeZen,
Meta,
Xai,
Mistral,
Telecomjs,
ModelstudioTokenPlan,
ModelstudioTokenPlanAnthropic,
ModelstudioCodingPlan,
ModelstudioCodingPlanAnthropic,
Antigravity,
Google,
Edenai,
Custom,
}Variants§
Deepseek
DeepseekAnthropic
NvidiaNim
Openai
Atlascloud
WanjieArk
Volcengine
Openrouter
Orcarouter
XiaomiMimo
Novita
Fireworks
Siliconflow
Arcee
SiliconflowCN
Moonshot
Sglang
Vllm
Ollama
OllamaCloud
Huggingface
Together
Qianfan
OpenaiCodex
Anthropic
Openmodel
Zai
Stepfun
Minimax
MinimaxAnthropic
Deepinfra
Sakana
LongCat
OpencodeGo
OpencodeZen
Meta
Xai
Mistral
Mistral AI — la Plateforme (OpenAI-compatible Chat Completions).
Telecomjs
Jiangsu Telecom TokenHub (OpenAI-compatible).
An AI gateway operated by Jiangsu Telecom that speaks the OpenAI Chat Completions wire protocol and serves a broad model catalog; each API key may access a different subset of models.
ModelstudioTokenPlan
Alibaba Cloud Model Studio — Token Plan (OpenAI-compatible Chat Completions).
Token Plan Personal and Team share the same endpoint. Both the OpenAI
and Anthropic dialects are available; select the Anthropic dialect via
modelstudio-token-plan-anthropic. Pay-as-you-go workspace-id templating
is out of scope for v1; use a custom provider for that plan.
ModelstudioTokenPlanAnthropic
Alibaba Cloud Model Studio — Token Plan Anthropic-compatible endpoint.
ModelstudioCodingPlan
Alibaba Cloud Model Studio — Coding Plan (OpenAI-compatible Chat Completions).
ModelstudioCodingPlanAnthropic
Alibaba Cloud Model Studio — Coding Plan Anthropic-compatible endpoint.
Antigravity
Google Antigravity (agy CLI) — consent-gated read-only credential
import only; the cloud-code wire protocol is not implemented and
requests fail closed with an actionable message.
Google — Gemini OpenAI-compatible endpoint. Its own backend, not an OpenAI alias: thought signatures on tool calls are captured and replayed per Google’s contract.
Edenai
Eden AI — OpenAI-compatible AI gateway (aggregator).
Serves a broad catalog of upstream models under provider/model
namespaced wire ids over the OpenAI Chat Completions protocol.
Custom
User-defined OpenAI-compatible endpoint (#1519).
A single dynamic identity for arbitrary [providers.<name>] kind="openai-compatible" entries. It speaks the OpenAI Chat Completions
wire protocol and carries no built-in base URL/model — the concrete
endpoint and model arrive via config (base_url / model) and the
route’s base_url_override, never from this static descriptor.
Implementations§
Source§impl ProviderKind
impl ProviderKind
Sourcepub const ALL: [Self; 42]
pub const ALL: [Self; 42]
Catalog / picker surface: one identity per vendor.
Dual-wire dialect kinds (*Anthropic) and Model Studio plan variants
stay on the enum for serde and provider_for_kind, but they are not
first-class catalog rows. Plan is mode / base_url; dialect is
wire = openai|anthropic on the primary provider config.
pub fn all() -> &'static [Self]
pub fn names_hint() -> String
pub fn as_str(self) -> &'static str
pub fn parse(value: &str) -> Option<Self>
Sourcepub fn parse_config_identity(value: &str) -> Option<Self>
pub fn parse_config_identity(value: &str) -> Option<Self>
Parse a provider identifier for config-table identity — the kind
used to look up credentials, model, and base URL in the user’s
[providers.*] tables.
parse is catalog identity: legacy dual-wire
spellings (deepseek-anthropic, minimax-anthropic, the Model Studio
plan/dialect kinds) are aliases of the vendor primary and collapse
onto it so pickers show one row per vendor. That collapse must not
decide which config table holds the user’s credentials: TOML serde
keeps the legacy kind for provider = "deepseek-anthropic", so env
(CODEWHALE_PROVIDER) and config set provider must resolve the same
way or the user’s own named table is orphaned with the key present.
An exact canonical-id or provider_config_key match across the full
registry (including legacy dialect/plan kinds) therefore wins over
alias collapse; everything else falls back to parse.
Wire-endpoint selection is unaffected: it keys off the resolved kind’s
wire config, not this parse.
pub fn is_siliconflow(self) -> bool
Sourcepub fn secret_store_slot(self) -> &'static str
pub fn secret_store_slot(self) -> &'static str
Canonical durable-credential slot in the local secret store.
Most providers own a slot named after their id. Variants authenticated by the SAME account share one slot so a single saved key (or logout) applies to the whole family:
SiliconflowCNsharessiliconflow(historical China-endpoint slot, already the TUI/CLI convention).- The four Alibaba Cloud Model Studio variants share
modelstudio-token-plan: one Model Studio account/key authenticates the Token Plan and Coding Plan endpoints in both wire dialects, so per-variant slots produced three bogus “missing key” rows whenever one variant held the key.
Sourcepub fn provider(self) -> &'static dyn Provider
pub fn provider(self) -> &'static dyn Provider
Return the built-in metadata entry for this provider.
This is a metadata foundation only; runtime routing still resolves
through crate::ConfigToml::resolve_runtime_options.
Trait Implementations§
Source§impl Clone for ProviderKind
impl Clone for ProviderKind
Source§fn clone(&self) -> ProviderKind
fn clone(&self) -> ProviderKind
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 ProviderKind
Source§impl Debug for ProviderKind
impl Debug for ProviderKind
Source§impl Default for ProviderKind
impl Default for ProviderKind
Source§fn default() -> ProviderKind
fn default() -> ProviderKind
Source§impl<'de> Deserialize<'de> for ProviderKind
impl<'de> Deserialize<'de> for ProviderKind
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>,
impl Eq for ProviderKind
Source§impl PartialEq for ProviderKind
impl PartialEq for ProviderKind
Source§impl Serialize for ProviderKind
impl Serialize for ProviderKind
impl StructuralPartialEq for ProviderKind
Auto Trait Implementations§
impl Freeze for ProviderKind
impl RefUnwindSafe for ProviderKind
impl Send for ProviderKind
impl Sync for ProviderKind
impl Unpin for ProviderKind
impl UnsafeUnpin for ProviderKind
impl UnwindSafe for ProviderKind
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.