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: StringThe 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: boolWhether 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
impl ResolvedConfig
Sourcepub fn timeouts(&self) -> Timeouts
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.
Sourcepub fn stamp_transport(&self, wire: &mut WireRequest)
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).
Sourcepub fn provider_ctx<'a>(
&'a self,
beta: &'a [(&'a str, &'a str)],
) -> ProviderCtx<'a>
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.
Sourcepub fn auth_ctx(&self) -> AuthCtx<'_>
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
impl Clone for ResolvedConfig
Source§fn clone(&self) -> ResolvedConfig
fn clone(&self) -> ResolvedConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more