Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / QuotaEstimate

Interface: QuotaEstimate

Defined in: packages/core/src/l0/spi/quota.ts:47

The pre-dispatch estimate a reservation is admitted under. Token estimates are heuristic (the engine uses its deterministic four-characters-per-token prompt estimate plus the request's output cap when one is set); reconcile() settles the difference against actual usage inside the same accounting window.

Properties

PropertyTypeDescriptionDefined in
inputTokensnumberHeuristic prompt estimate for the attempt.packages/core/src/l0/spi/quota.ts:51
maxOutputTokens?numberThe request's output token cap, when one is set.packages/core/src/l0/spi/quota.ts:53
requestsnumberWire calls this reservation admits; the engine always sends 1.packages/core/src/l0/spi/quota.ts:49