struct AccountEntry {
display_name: String,
provider: Option<Provider>,
base_url: Option<String>,
token: Option<String>,
models: Vec<String>,
model_slugs: HashMap<String, String>,
model_aliases: HashMap<String, Vec<String>>,
env: HashMap<String, String>,
}Expand description
Unknown fields are rejected so a near-miss key (providers) fails
loudly instead of loading and leaving the account probing the wrong
endpoint until preflight hangs on it.
Fields§
§display_name: String§provider: Option<Provider>Which backend this account talks to. Required: an account that
does not say probes the wrong endpoint and bails at preflight,
so silence is the dangerous answer. Held as Option only so the
absent case can name the account; None is a load error.
base_url: Option<String>The flat base URL. Required for base-url providers; an Anthropic account may omit it (the gateway constant is its upstream).
token: Option<String>The credential the gateway forwards, mapped onto the right variable per provider. Required.
models: Vec<String>The canonical model names the account serves. Required non-empty.
model_slugs: HashMap<String, String>Canonical name -> upstream slug, only where the spellings differ.
model_aliases: HashMap<String, Vec<String>>Canonical name -> the other names a request may arrive under for that model.
env: HashMap<String, String>Provider-behaviour extras only - timeouts, context caps, fallback switches. Base-url and credential keys are rejected: they are the flat keys’ job.
Trait Implementations§
Source§impl Debug for AccountEntry
Hand-written because the flat token and the env map are credentials.
impl Debug for AccountEntry
Hand-written because the flat token and the env map are credentials.
Source§impl<'de> Deserialize<'de> for AccountEntry
impl<'de> Deserialize<'de> for AccountEntry
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 AccountEntry
impl RefUnwindSafe for AccountEntry
impl Send for AccountEntry
impl Sync for AccountEntry
impl Unpin for AccountEntry
impl UnsafeUnpin for AccountEntry
impl UnwindSafe for AccountEntry
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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