pub struct BuiltinProviderEntry {
pub id: String,
pub display_name: String,
pub aliases: Vec<String>,
pub api: String,
pub env_key: String,
pub extra_env_keys: Vec<String>,
pub base_url: String,
pub auth_method: AuthMethod,
pub extra_headers: Vec<(String, String)>,
pub category: String,
pub description: String,
pub default_enabled: bool,
}Expand description
Stable since 0.63.0
A single built-in provider entry, deserialized from `data/catalog/providers.toml`.
All fields except id, display_name, api, env_key, auth_method,
category, description are optional with sensible defaults.
Fields§
§id: StringPrimary provider name (e.g. “openai”)
display_name: StringDisplay name (e.g. “OpenAI”)
aliases: Vec<String>Alternative names that resolve to this provider
api: StringAPI type used by this provider
env_key: StringEnvironment variable that may hold the API key
extra_env_keys: Vec<String>Additional environment variables to check
base_url: StringDefault base URL for the API (empty = computed at runtime)
auth_method: AuthMethodHow to pass the API key
extra_headers: Vec<(String, String)>Extra HTTP headers required by this provider
category: StringProvider category for UI grouping
description: StringShort human-readable description
default_enabled: boolWhether this provider is enabled by default
Implementations§
Source§impl BuiltinProviderEntry
impl BuiltinProviderEntry
Sourcepub fn all_env_keys(&self) -> impl Iterator<Item = &str>
pub fn all_env_keys(&self) -> impl Iterator<Item = &str>
Get all environment variable names for this provider (primary + extras).
Sourcepub fn is_openai_compatible(&self) -> bool
pub fn is_openai_compatible(&self) -> bool
Check if this is an OpenAI-compatible provider.
Trait Implementations§
Source§impl Clone for BuiltinProviderEntry
impl Clone for BuiltinProviderEntry
Source§fn clone(&self) -> BuiltinProviderEntry
fn clone(&self) -> BuiltinProviderEntry
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 BuiltinProviderEntry
impl Debug for BuiltinProviderEntry
Source§impl<'de> Deserialize<'de> for BuiltinProviderEntry
impl<'de> Deserialize<'de> for BuiltinProviderEntry
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BuiltinProviderEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BuiltinProviderEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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.
Source§impl Serialize for BuiltinProviderEntry
impl Serialize for BuiltinProviderEntry
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for BuiltinProviderEntry
impl RefUnwindSafe for BuiltinProviderEntry
impl Send for BuiltinProviderEntry
impl Sync for BuiltinProviderEntry
impl Unpin for BuiltinProviderEntry
impl UnsafeUnpin for BuiltinProviderEntry
impl UnwindSafe for BuiltinProviderEntry
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