pub struct ProviderDef {
pub id: &'static str,
pub display: &'static str,
pub auth_method: AuthMethod,
pub secret_key: Option<&'static str>,
pub device_flow: Option<&'static DeviceFlowConfig>,
pub base_url: Option<&'static str>,
pub models: &'static [&'static str],
pub help_url: Option<&'static str>,
pub help_text: Option<&'static str>,
}Expand description
A provider definition with its secret key name and available models.
Fields§
§id: &'static str§display: &'static str§auth_method: AuthMethodAuthentication method for this provider.
secret_key: Option<&'static str>Name of the secret that holds the API key or access token.
For API key auth: e.g. "ANTHROPIC_API_KEY".
For device flow: e.g. "GITHUB_COPILOT_TOKEN".
None means the provider does not require authentication (e.g. Ollama).
device_flow: Option<&'static DeviceFlowConfig>Device flow configuration (only used when auth_method is DeviceFlow).
base_url: Option<&'static str>§models: &'static [&'static str]§help_url: Option<&'static str>URL where the user can sign up or get an API key.
help_text: Option<&'static str>Short hint shown in the API key dialog (e.g. “Get one at …”).
Auto Trait Implementations§
impl Freeze for ProviderDef
impl RefUnwindSafe for ProviderDef
impl Send for ProviderDef
impl Sync for ProviderDef
impl Unpin for ProviderDef
impl UnsafeUnpin for ProviderDef
impl UnwindSafe for ProviderDef
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