pub(crate) struct LoadedAccount {
pub display_name: String,
pub provider: Provider,
pub base_url: Option<String>,
pub models: Vec<String>,
pub model_slugs: HashMap<String, String>,
pub model_aliases: HashMap<String, Vec<String>>,
pub env: HashMap<String, String>,
}Expand description
One account as the config load produces it. The gateway’s account state is built from these, and the spawn path stamps the per-account env onto the child from here.
Fields§
§display_name: String§provider: ProviderDeclared backend. Drives the usage probe and the billing shape.
See Provider.
base_url: Option<String>The flat base_url key. None for an Anthropic account: the
gateway constant is its upstream.
models: Vec<String>The canonical model names the account serves. Drives the gateway’s selection walk.
model_slugs: HashMap<String, String>Canonical name -> upstream slug, only where the spellings
differ. Keys are always members of Self::models.
model_aliases: HashMap<String, Vec<String>>Canonical name -> the other names a request may arrive under for
that model. Keys are always members of Self::models.
env: HashMap<String, String>Provider-behaviour extras (timeouts, context caps, fallback switches) plus the derived credential and base-url variable stamps the gateway and the child read.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoadedAccount
impl RefUnwindSafe for LoadedAccount
impl Send for LoadedAccount
impl Sync for LoadedAccount
impl Unpin for LoadedAccount
impl UnsafeUnpin for LoadedAccount
impl UnwindSafe for LoadedAccount
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<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