Result budgets and provider estimates
The credential-free local gate makes no request to EvalGate. Arbitrary code in your own evals can call a provider directly; EvalGate cannot cap charges made outside its managed dispatch path. Keep the first gate deterministic.Evaluation results
The candidate starts every organization at 10,000 results per UTC calendar month. Its durable admission check reserves the complete result count before paid work starts, across hosted runs, imports, shadow runs and portable executions. Concurrent requests share the same organization lock. Unknown billing or producer outcomes keep their holds; a timeout does not make reserved usage free. The cap counts results, including failures, rather than dollars. Included plan allowances still apply. Additional results cost $1 per 1,000; provider charges are separate. Existing subscriptions are not changed by this policy. ReadGET /api/costs/result-budget. Administrators can change the limit in
Settings → Billing, or PUT /api/costs/result-budget with
monthlyResultLimit, the current expectedRevision, and a non-empty reason.
The service rechecks current administrator membership and records the change in
the same transaction as its audit fact. Stale approvals return a conflict.
Zero stops new work. Lowering the cap does not cancel admitted work.
Agent top-ups
An agent can buy eval results for its own organization with a machine payment (the Machine Payments Protocol). It is a source candidate and needs a Stripe account with machine payments enabled; both calls return 503 while it is unavailable.- With an API key that holds
admin:workspace, callPOST /api/billing/agent-payments/top-upswith{"amountUsd": 5},25or100for 5,000, 25,000 or 100,000 results. The response carriespayUrl, valid for 30 minutes. POSTthepayUrlwith an MPP client. The first call returns 402 with aWWW-Authenticate: Paymentchallenge; the client pays with a Stripe shared payment token (card or Link) or USDC on Tempo, and retries withAuthorization: Payment. A settled top-up returns 200 with aPayment-Receiptheader.
Judges before CI
Before scheduling a hosted judge, callPOST /api/llm-judge/estimate with its
organization-owned configId and caseCount. The response separates:
- the reviewed upper bound for provider charges, including criteria, stability repeats, retries and configured fallbacks;
- the maximum EvalGate result charge before included allowances;
- pricing identifiers, expiry, possible provider-call count and currently available provider budget.
Copilot before a model call
The first send prepares a cost estimate. Review its provider upper bound and choose Approve and send. Preparation makes no model call. The approval covers one reply, all possible tool rounds and optional history compression; future proposal execution requires its own review. Automation uses the existing action endpoint:POST /api/copilot/threads/{id}/actions with preview: true, then sends the
same message with an explicit finite maxProviderCostUsd. Missing approval,
unknown pricing or an estimate above the approval blocks execution. The physical
dispatch boundary enforces approved organization, model, bytes, call count and
cumulative provider liability alongside the existing durable daily budget.
TypeScript/Python generated operations and the api CLI use these same API
contracts after the matching package release. No browser-only budget bypass is
supported.