Prospective request, token, and cost limits for live optimizer work.
A budget reserves the worst-case input, output, and price envelope before an LM request begins, records provider-reported usage, and exposes a portable snapshot suitable for an experiment Result or Artifact. Resuming from a snapshot conservatively charges unresolved reservations once, so a crash cannot silently restore spend capacity.
Use Imp.budgeted_lm/3 to wrap every task and proposal LM participating in
the workflow. The wrapper disables hidden transport retries, counts the
actual Req transport attempt, and records provider telemetry in the calling
process, keeping a logical request from escaping the declared ceilings.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type limit() :: non_neg_integer() | number() | :infinity