Skip to main content

ResolvedConfig

Struct ResolvedConfig 

Source
pub struct ResolvedConfig {
Show 15 fields pub provider: Provider, pub model: String, pub model_from_cache: bool, pub output: OutMode, pub thinking: bool, pub inline_key: Option<Secret>, pub max_tokens: Option<u32>, pub temperature: Option<f32>, pub top_p: Option<f32>, pub reasoning: Option<ReasoningEffort>, pub service_tier: Option<ServiceTier>, pub stream: Option<bool>, pub timeout: Option<u64>, pub system: Option<Vec<Content>>, pub extra: Map<String, Value>,
}
Expand description

The one config the pipeline runs on (config §7). model is the alias- resolved WIRE id, so ProviderCtx.model is final and encode has no model logic (arch §4.1). Each gen scalar already carries the routed row’s body_defaults beneath flag/env/file (folded at resolve, config §4.1).

Fields§

§provider: Provider§model: String

The alias-resolved model SEED (model-discovery §4, §5.2): the explicit model (a full wire id or a partial), substituted through model_aliases, or "" when absent. Resolution does NOT place it against the cache — serve resolves the seed to a concrete wire id via select_model over the cache, in place, before encode. --raw never reads it (encode is bypassed).

§model_from_cache: bool

Whether Self::model resolved FROM the cache (an entry) versus VERBATIM (the seed passed through because the cache could not place it) — the carried §4 Provenance, set by serve’s cache lookup, read by the §5.3 404 hint so the caller knows the next move (a Cached 404 = a stale cache, a Verbatim 404 = a cold cache or a typo). false until the lookup runs (and on the --raw path, which never reads the model). CARRIED, not reconstructed (arch §3.5).

§output: OutMode§thinking: bool

--thinking resolved to a concrete bool (default false); the text sink reads it to gate reasoning + the separator (arch §5.3). Inert in NDJSON/raw.

§inline_key: Option<Secret>§max_tokens: Option<u32>§temperature: Option<f32>§top_p: Option<f32>§reasoning: Option<ReasoningEffort>

The resolved portable reasoning effort (config §4): fill_absent supplies it to a request that omits its own. Each encode maps it to the dialect’s native reasoning shape (providers.md §6); None is the no-reasoning path.

§service_tier: Option<ServiceTier>

The resolved portable processing lane (config §4): fill_absent supplies it to a request that omits its own. Each encode maps it to the dialect’s service_tier spelling (providers.md §6.2); None is the provider-default lane.

§stream: Option<bool>§timeout: Option<u64>

The resolved per-request transport SILENCE budget in seconds (config §4.3, arch §13.15): None leaves the bounds unset. bz reads it via Self::timeouts — which FANS the one value onto the three ureq budgets — and stamps the WireRequest; the floor is data/defaults.toml.

§system: Option<Vec<Content>>

The resolved leading system prompt (config §4, §7): fill_absent supplies it to a request that omits its own system. None is the no-system path.

§extra: Map<String, Value>

Config-level body passthrough (config §4.1): the top-level extra map with the routed row’s non-gen body_defaults merged over it (the row wins, being more specific). fill_absent seeds it into req.extra beneath the request’s own keys, so it reaches the wire through the encoders’ one req.extra fold.

Implementations§

Source§

impl ResolvedConfig

Source

pub fn timeouts(&self) -> Timeouts

The resolved transport timeout as the seam’s Timeouts (config §4.3, arch §13.15): the FAN-OUT query — the one silence budget feeds all three ureq budgets (connect / response-headers / inter-chunk idle), so “which bounds” has one home (the resolved config’s single timeout) and the fan is observable at the WireRequest seam rather than buried in the impure shim.

Source

pub fn stamp_transport(&self, wire: &mut WireRequest)

Stamp the row’s TRANSPORT POLICY onto a request about to cross the seam (transport spec §4.3) — the resolved Timeouts, plus the operator-selected delegate when the row carries a [provider.transport] block. The ONE home: the shared generation tail (encoded and --raw), --list-models and --count-tokens all call it, so a row’s transport reaches every request bz makes by construction, with no fourth site to forget (the OAuth refresh inherits it off the data request’s wire, auth §6). A row with no block leaves wire.exec exactly as it was — None on every HTTP dialect, and the protocol’s own ExecSpec on an exec dialect, which resolution has already proven cannot co-occur (config §4.1).

Source

pub fn provider_ctx<'a>( &'a self, beta: &'a [(&'a str, &'a str)], ) -> ProviderCtx<'a>

The secret-free ProviderCtx handed to encode/auth (arch §4.1): the ONE projection of the resolved row onto “how to talk to it”, shared by serve’s generation request and models’s GET so the field mapping has one home. The beta slice is passed in (not borrowed off self) because it is built from the row’s owned (String, String) pairs as (&str, &str) at the call site; 'a ties it to the same borrow so it outlives the returned ctx.

Source

pub fn auth_ctx(&self) -> AuthCtx<'_>

The auth-private AuthCtx handed ONLY to Auth::apply (arch §4.1, auth §1.3): the ONE projection of the resolved row’s credential fields, shared by serve and models so a growing AuthCtx (ambient was the latest field) maps in one place, never two. Borrows self directly — every field is a row reference.

Trait Implementations§

Source§

impl Clone for ResolvedConfig

Source§

fn clone(&self) -> ResolvedConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResolvedConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ResolvedConfig

Source§

fn eq(&self, other: &ResolvedConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ResolvedConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.