pub struct Config {
pub routes: Vec<Route>,
pub budget: Budget,
pub escalation: Escalation,
pub gate_defs: Vec<GateDef>,
pub providers: Vec<ProviderDef>,
}Expand description
Top-level configuration document.
Fields§
§routes: Vec<Route>Ordered routes; first match wins.
budget: BudgetSpend caps.
escalation: EscalationEscalation limits and promotion rules.
gate_defs: Vec<GateDef>User-defined subprocess gates (SPEC §8.1), referenced by id from a route’s gates /
deferred_gates. Declared as [[gate]] sections in TOML.
providers: Vec<ProviderDef>Extra model providers a ladder can route to, beyond the built-in anthropic / openai.
Any OpenAI-compatible endpoint (Groq, Together, Fireworks, DeepSeek, Mistral, xAI,
OpenRouter, Ollama, vLLM, Azure, …) is one [[provider]] entry — no rebuild. Declared as
[[provider]] sections; a ladder rung is then <id>/<model>.
Implementations§
Source§impl Config
impl Config
Sourcepub fn parse(toml_str: &str) -> Result<Self>
pub fn parse(toml_str: &str) -> Result<Self>
Parse a TOML configuration document.
§Errors
Returns Error::Config on invalid TOML or unknown fields, or Error::InvalidConfig on
an invalid gate definition (not exactly one of cmd/judge, a judge threshold outside
[0,1], or a duplicate/blank id).