pub struct ProviderEntry {
pub id: String,
pub shape: WireShape,
pub base_url: String,
pub api_key_env: Option<String>,
pub aws_region: Option<String>,
pub enabled: Option<bool>,
pub local: Option<bool>,
}Expand description
One [[proxy.providers]] registry entry (see ProxyConfig::providers).
Fields§
§id: StringRegistry id, used in the /providers/{id}/... route and in routing
rules. Lowercase alphanumeric plus -/_; must not shadow a built-in
provider name (anthropic, openai, chatgpt, gemini).
shape: WireShapeWhich API dialect the endpoint speaks (anthropic|openai|gemini|bedrock).
base_url: StringEndpoint base URL. HTTPS for any non-loopback host; a declared registry entry is itself the custom-host opt-in (no separate allowlist flag).
api_key_env: Option<String>Name of the environment variable holding the upstream API key the
gateway injects (replacing the caller’s credential headers). None =
forward the caller’s own credentials verbatim (default, loopback mode).
aws_region: Option<String>AWS region for Bedrock SigV4. Bedrock uses standard AWS credential
environment variables and rejects api_key_env.
enabled: Option<bool>Set false to keep the entry in config but take it out of service.
local: Option<bool>Marks this endpoint as local inference (Ollama/vLLM/…): usage is booked
at the transparent local_shadow_rate instead of provider list prices
(enterprise#15/#18). Unset = derived from the URL (loopback hosts are
local). Set it explicitly when the endpoint is local but not loopback —
the containerized gateway reaching the host’s Ollama
(host.docker.internal) or an in-cluster server (ollama.svc.cluster.local).
Trait Implementations§
Source§impl Clone for ProviderEntry
impl Clone for ProviderEntry
Source§fn clone(&self) -> ProviderEntry
fn clone(&self) -> ProviderEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProviderEntry
impl Debug for ProviderEntry
Source§impl<'de> Deserialize<'de> for ProviderEntry
impl<'de> Deserialize<'de> for ProviderEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ProviderEntry
impl RefUnwindSafe for ProviderEntry
impl Send for ProviderEntry
impl Sync for ProviderEntry
impl Unpin for ProviderEntry
impl UnsafeUnpin for ProviderEntry
impl UnwindSafe for ProviderEntry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more