beam_usage
beam_usage limits what each user may run and counts what they used.
beam_usage = { path = "../riverbeam/crates/beam_usage" }
| Item | Role |
|---|---|
UsagePlan | name, limits, overage_policy; UsagePlan::unlimited(name) |
UsageLimits | Daily request and token limits, per-request tokens, allowed agents, modalities and models |
OveragePolicy | HardBlock (default), SoftWarn, Throttle |
UsageGuard | check(user_id, plan, input) -> GuardResult |
GuardResult | allowed, reason, overage_policy |
UsageTracker | record(user_id, event), get_usage(user_id) -> UsageSummary |
UsageEvent, UsageSummary | What was used; totals for the current period |
UsageStore | Counter storage trait; periods are UTC days |
InMemoryUsageStore | The shipped store |
There are no feature flags.
What each limit does, and which ones are not enforced yet, is in Usage quotas.