module RailsAiAdmin::Assistant::Budget
One actor’s assistant spend in one tenant over the last 24 hours, read from RubyLLM’s usage ledger: every provider attempt that actor’s admin chats made, including retries and failed requests. The limits are checked when a human message is admitted and again before each provider request of a turn, so the request that crosses a limit still finishes.
Constants
- Spend
-
tokens sums every token bucket; cost is the known US dollar total and unpriced counts attempts whose cost the provider and the model registry could not price, so cost can be lower than the real spend.
- TOKEN_COLUMNS
- WINDOW