pub struct BuiltinProvider {
pub name: &'static str,
pub display_name: &'static str,
pub aliases: &'static [&'static str],
pub api: Api,
pub env_key: &'static str,
pub extra_env_keys: &'static [&'static str],
pub base_url: &'static str,
pub default_enabled: bool,
pub auth_method: AuthMethod,
pub extra_headers: &'static [(&'static str, &'static str)],
pub category: &'static str,
pub description: &'static str,
}Expand description
Stable since 0.63.0
Metadata for a built-in provider.Fields§
§name: &'static strPrimary provider name (e.g. “openai”)
display_name: &'static strDisplay name (e.g. “OpenAI”)
aliases: &'static [&'static str]Alternative names that resolve to this provider
api: ApiAPI type used by this provider
env_key: &'static strEnvironment variable(s) that may hold the API key (in priority order)
extra_env_keys: &'static [&'static str]Additional environment variables to check
base_url: &'static strDefault base URL for the API
default_enabled: boolWhether this provider is enabled by default
auth_method: AuthMethodHow to pass the API key
extra_headers: &'static [(&'static str, &'static str)]Extra HTTP headers required by this provider
category: &'static strProvider category for UI grouping (“primary”, “chinese”, “enterprise”, “open”, “coding”, “cloud”, “specialized”)
description: &'static strShort human-readable description shown in the provider selection UI
Trait Implementations§
Source§impl Clone for BuiltinProvider
impl Clone for BuiltinProvider
Source§fn clone(&self) -> BuiltinProvider
fn clone(&self) -> BuiltinProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BuiltinProvider
impl Debug for BuiltinProvider
Source§impl From<&BuiltinProviderEntry> for BuiltinProvider
impl From<&BuiltinProviderEntry> for BuiltinProvider
Source§fn from(entry: &BuiltinProviderEntry) -> BuiltinProvider
fn from(entry: &BuiltinProviderEntry) -> BuiltinProvider
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BuiltinProvider
impl RefUnwindSafe for BuiltinProvider
impl Send for BuiltinProvider
impl Sync for BuiltinProvider
impl Unpin for BuiltinProvider
impl UnsafeUnpin for BuiltinProvider
impl UnwindSafe for BuiltinProvider
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