Cost control
[PLACEHOLDER — outline only, not full prose yet.]
Gate a pipeline on budget covers
budget.max_usd — a hard backstop that aborts a run after it’s already
gotten expensive. This guide is about the design choices that decide how
expensive a pipeline gets before that backstop is ever needed.
Planned sections
Section titled “Planned sections”- A budget cap is a backstop, not a strategy. It catches a runaway run; it does nothing about a pipeline that’s reliably, unremarkably expensive every single time it fires. The rest of this guide is about the second problem.
- Model selection is the biggest lever, by far. Writing good
agents’s “match the model to the job”
principle is a cost argument as much as a quality one — a cheap default
with
model_fallbacks, an expensive model reserved for the one step (often a verifier) where it’s actually earning its keep. - An accurate confidence threshold saves money, not just catches errors. A step that escalates early on genuinely low confidence avoids paying for however many expensive downstream steps would otherwise have run on a shaky foundation. Choosing confidence thresholds covers picking the number; this is the cost argument for why getting it right matters beyond correctness.
- Verifier mode is a cost/rigor trade-off.
criticre-reads what the primary already produced;independentredoes the entire task from scratch, roughly doubling that step’s cost. Verifiers frames the choice around correlated vs uncorrelated errors — the same choice, priced. - Grounding is cheap if the judge is. Writing your grounding
judge’s model-choice
section applies directly here — a grounding judge doesn’t need a
frontier model, and shadow mode means you’re already paying for it on
every run whether or not
enforce: trueis set. max_itemson a fan-out is a direct cost cap. N branches means N LLM calls, concurrently — fan-out’smax_itemsguardrail (default 20) is as much a cost control as a safety one, worth setting deliberately rather than leaving at the default for a step whose list could plausibly be much longer.- Team budgets tell you about a trend;
max_usdstops one run.pricing.team_budgetsis advisory, month-to-date, and never blocks anything — it’s for noticing a team’s spend is climbing before it’s a crisis.budget.max_usdis the emergency brake for one run. Neither substitutes for the other. - Unpriced spend is invisible spend. A model with no
pricing.modelsentry contributesNULL, not0, to every rollup — cost control starts with the pricing table actually covering what’s really running, or opting into live/approximate OpenRouter pricing so an unpriced model at least shows up as an estimate instead of a gap.
Where next
Section titled “Where next”- Cost accounting — the full pricing table, budget guardrail, and team-budget reference.
- Gate a pipeline on budget — the hands-on backstop this guide’s opening section refers to.