pub struct ProviderSpec {Show 13 fields
pub name: &'static str,
pub keywords: &'static [&'static str],
pub env_key: &'static str,
pub display_name: &'static str,
pub litellm_prefix: &'static str,
pub skip_prefixes: &'static [&'static str],
pub is_gateway: bool,
pub is_local: bool,
pub is_oauth: bool,
pub default_api_base: &'static str,
pub detect_by_key_prefix: &'static str,
pub detect_by_base_keyword: &'static str,
pub strip_model_prefix: bool,
}Expand description
Metadata for a single LLM provider.
Used for model-name matching, API key detection, and URL prefixing.
All string fields are &'static str because instances live in the
static PROVIDERS array.
Fields§
§name: &'static strConfig field name (e.g. "dashscope").
keywords: &'static [&'static str]Model-name keywords for matching (lowercase).
env_key: &'static strEnvironment variable for the API key (e.g. "DASHSCOPE_API_KEY").
display_name: &'static strHuman-readable name shown in status output.
litellm_prefix: &'static strPrefix added to model names for routing (e.g. "deepseek" makes
deepseek-chat become deepseek/deepseek-chat).
skip_prefixes: &'static [&'static str]Do not add prefix when model already starts with one of these.
is_gateway: boolRoutes any model (e.g. OpenRouter, AiHubMix).
is_local: boolLocal deployment (e.g. vLLM).
is_oauth: boolUses OAuth flow instead of API key.
default_api_base: &'static strFallback base URL for the provider.
detect_by_key_prefix: &'static strMatch api_key prefix for auto-detection (e.g. "sk-or-").
detect_by_base_keyword: &'static strMatch substring in api_base URL for auto-detection.
strip_model_prefix: boolStrip "provider/" prefix before re-prefixing.
Implementations§
Trait Implementations§
Source§impl Clone for ProviderSpec
impl Clone for ProviderSpec
Source§fn clone(&self) -> ProviderSpec
fn clone(&self) -> ProviderSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more