pub struct Custom;Expand description
User-defined OpenAI-compatible endpoint (#1519).
A single dynamic provider identity for arbitrary [providers.<name>] kind="openai-compatible" config entries. Unlike the built-in providers it
carries no real default base URL/model/env var: the concrete endpoint, model
id, and auth env var all arrive from the named [providers.<name>] config
table at route time. The placeholder base URL/model here exist only so the
descriptor stays well-formed (non-empty) for conformance; runtime routing
always supplies a base_url_override and a wire model id, so these
placeholders are never used to reach the network.
Trait Implementations§
Source§impl Provider for Custom
impl Provider for Custom
Source§fn kind(&self) -> ProviderKind
fn kind(&self) -> ProviderKind
Provider enum variant represented by this entry.
Source§fn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
Human-readable provider label for UIs and diagnostics.
Source§fn default_base_url(&self) -> &'static str
fn default_base_url(&self) -> &'static str
Default base URL used when no config/env/CLI override is present.
Source§fn default_model(&self) -> &'static str
fn default_model(&self) -> &'static str
Default model used when no config/env/CLI override is present.
Source§fn env_vars(&self) -> &'static [&'static str]
fn env_vars(&self) -> &'static [&'static str]
Environment variable candidates used for this provider’s API key.
Source§fn provider_config_key(&self) -> &'static str
fn provider_config_key(&self) -> &'static str
TOML table key under
[providers.<key>].Source§fn wire_policy(&self) -> WirePolicy
fn wire_policy(&self) -> WirePolicy
Policy used to select the request wire format.
Source§fn aliases(&self) -> &'static [&'static str]
fn aliases(&self) -> &'static [&'static str]
Alternate names accepted during provider resolution.
Source§fn credential_help(&self) -> CredentialHelp
fn credential_help(&self) -> CredentialHelp
Credential acquisition metadata shared by onboarding, setup, diagnostics,
and provider-help surfaces.
Auto Trait Implementations§
impl Freeze for Custom
impl RefUnwindSafe for Custom
impl Send for Custom
impl Sync for Custom
impl Unpin for Custom
impl UnsafeUnpin for Custom
impl UnwindSafe for Custom
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