pub struct Intelligence {Show 15 fields
pub endpoints: Vec<String>,
pub model: Option<String>,
pub dialect: Option<String>,
pub token: Option<Secret>,
pub token_file: Option<String>,
pub headers: BTreeMap<String, String>,
pub auth: Option<Auth>,
pub swap_policy: Option<String>,
pub structured_output: StructuredOutput,
pub budget: Budget,
pub pricing: BTreeMap<String, Pricing>,
pub timeout: Option<Dur>,
pub models: BTreeMap<String, ModelTier>,
pub default: Option<String>,
pub preflight_model: Option<String>,
}Fields§
§endpoints: Vec<String>§model: Option<String>§dialect: Option<String>The wire dialect: openai (default), anthropic, or
bedrock (native Amazon Bedrock Converse — pair with auth: {kind: aws, service: bedrock}). Unset ⇒ OpenAI-compatible.
token: Option<Secret>§token_file: Option<String>§headers: BTreeMap<String, String>§auth: Option<Auth>A unified credential provider for the LLM endpoint — e.g. oauth2
device-login for an enterprise gateway. Obtained via
agentd login intelligence; the resolved bearer overrides token.
swap_policy: Option<String>§structured_output: StructuredOutput§budget: Budget§pricing: BTreeMap<String, Pricing>§timeout: Option<Dur>§models: BTreeMap<String, ModelTier>Named model TIERS. The model was one instance-global string, so choosing a cheap model for a classify step and a frontier one for a judgement call meant forking a subagent process just to change it — and the breaker was per ENDPOINT, so a frontier and a cheap model behind one gateway shared one breaker and one spend pool.
A tier is NOT a second service catalog: services: already names
endpoints, auth, tags, rate and breaker, and restating those here would
be a parallel mechanism. A tier points AT a service and may only
narrow — it inherits that service’s trifecta tags and can never declare
its own floor, so “make it cheaper” cannot quietly become a different
security decision.
default: Option<String>Which tier is used when nothing names one. Falls back to model.
preflight_model: Option<String>The tier preflight runs on. Preflight is a recurring fixed cost on every inbound message, like compaction — it does not need the model that answers.
Implementations§
Source§impl Intelligence
impl Intelligence
Sourcepub fn wire_model(&self, reference: &str) -> String
pub fn wire_model(&self, reference: &str) -> String
Resolve a model reference to the wire model name.
A reference is either a declared TIER name or a literal model string,
with the tier winning. That ordering is what lets models: be adopted
without rewriting every place a model is already named — an existing
literal keeps working, and a tier name takes over the moment one is
declared under that name.
Sourcepub fn tier(&self, reference: &str) -> Option<&ModelTier>
pub fn tier(&self, reference: &str) -> Option<&ModelTier>
The tier a reference names, if it names one.
Sourcepub fn default_reference(&self) -> Option<String>
pub fn default_reference(&self) -> Option<String>
The model reference used when nothing names one: default (a tier),
else model (a literal or a tier name).
Sourcepub fn fallback_chain(&self, reference: &str) -> Vec<String>
pub fn fallback_chain(&self, reference: &str) -> Vec<String>
Walk the fallback chain from reference, stopping at the first tier
with no fallback. Cycles are impossible because validation refuses
them; the bound here is belt-and-braces for a config that reached the
runtime some other way.
pub fn timeout(&self) -> Duration
Sourcepub fn endpoint_list(&self) -> Option<String>
pub fn endpoint_list(&self) -> Option<String>
The comma-joined endpoint list URI the v1 intelligence client speaks.
Trait Implementations§
Source§impl Clone for Intelligence
impl Clone for Intelligence
Source§fn clone(&self) -> Intelligence
fn clone(&self) -> Intelligence
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more