The most the run may spend, in US dollars.
Optional maxThe most prompt and completion tokens the run may use, counted by this budget: zero or more.
Optional onWhat a call that would pass the budget does: 'throw' (the default) refuses it with
CostCapExceededError; 'warn' logs once per call and lets it run; a function is told
what was about to be refused and the call is then refused as with 'throw'. A function that throws refuses the
call with its own error, and the budgets that draw on this one hear of the refusal as of any other.
Optional guardThe guard that holds the spending; a budget given none makes its own, with no daily or single-call cap. On a guard
given, the budget sets the session cap of its id to maxCostUSD and keeps the daily cap the guard holds for that id.
Optional budgetThe id the guard keeps the spending under; a budget given none makes one.
Optional unpricedA call on a model with no price row: 'refuse' (the default) refuses it with UnpricedModelError,
since its cost could not be counted; 'allow' lets it run and counts its cost as nothing, while the token
budget and a budget already past its cap still refuse it.
Optional parentA budget this one draws on. Every check asks the parent first, with the same estimate, and every record and
outside cost is added to the parent after this budget. A refusal by the parent, or by any budget above it, runs
this budget's own onLimitReached function (when it is one) with the refusing budget's SpendLimitInfo,
after the refusing budget's own, before the error goes on. A parent chain that holds a budget on the same guard
and budgetId as this one is refused: the two would keep one total and charge every call to it twice.
A budget's settings.