Skip to main content

Module config

Module config 

Source
Expand description

Routing configuration (SPEC §8.4) — declarative, agent-first.

Config is the policy an operator (or agent) hands Firstpass: an ordered list of routes, each matching a slice of traffic to a mode, a model ladder, and gates; plus budget caps and escalation rules. The first matching route wins, so specific routes go first and a bare match = {} catch-all goes last.

Structs§

Budget
Spend caps. None means “no cap”.
Config
Top-level configuration document.
Escalation
Escalation limits and session-level promotion.
GateDef
A user-defined gate (SPEC §8.1). Exactly one kind per definition:
JudgeDef
Configuration for a native LLM-judge gate (SPEC §8.3): a separate model grades the candidate against a rubric. The runner enforces maker ≠ checker (a model never grades its own output) and treats the candidate as data, not instructions.
Match
Predicate over a request’s Features. Every present field is an AND-constraint; absent fields are wildcards.
ModelRef
A parsed provider/model reference.
Route
One routing rule.
SessionPromotion
“After N failures within a window, promote this session’s starting rung.”

Enums§

Mode
Serving mode for a route (SPEC glossary).
OnExhausted
What to do when a spend cap is hit (SPEC §8.4 — never brick the customer).
StringOrVec
A field that accepts either a single string or a list of strings in TOML/JSON.