pub struct Config {
pub max_review_rounds: u32,
pub llm: Vec<LlmConfig>,
}Expand description
The whole configuration tree, rooted at the file.
llm is an array of tables ([[llm]]), not a single [llm] section,
and the list is a preference order: Self::providers is the failover
chain.
#[serde(default)] means a file with an empty body deserializes
successfully; validate is what then rejects it, because a config
declaring no provider cannot run the mandatory LLM layer.
deny_unknown_fields for the reason LlmConfig carries it: a misspelled
max_reveiw_rounds was accepted, dropped, and run at the default, which is a
file that reads as configured and is not. site_only_field runs against the
raw tree before this deserialization, so SiteOnlyField still answers for a
policy key rather than being swallowed by a generic unknown-key message.
Fields§
§max_review_rounds: u32§llm: Vec<LlmConfig>Implementations§
Source§impl Config
impl Config
Sourcepub fn providers(&self) -> Vec<&LlmConfig>
pub fn providers(&self) -> Vec<&LlmConfig>
The failover chain: every enabled provider, in file order.
The single definition of “which providers are in play”. enabled is
an opt-out, so a disabled entry is skipped wherever it sits - a
disabled head falls through to the entry below it rather than
producing NotConfigured, which is what parking the local model was
always meant to do.
A Vec rather than an iterator because every caller wants a length or
an index (the chain numbers its providers in error messages) and the
list is at most a handful of entries.