What this thread does
Do first: open the gateway key dialog and add the Spend budget section.
Short answer
As of November 2026, langfuse v4.83.0 (2026-11-19) adds per-key budgets. Set a USD amount and a reset interval in the dialog. These are soft limits: in-flight requests can take spending past the amount.
What to do
1. Keep gateway request recording enabled: ingestion mode none ignores stored limits and refuses budget creation or changes. Switching back enables stored limits again. 2. Add Spend budget and enter an amount in USD. Choose Daily, Weekly, Monthly or Never; stored intervals are DAILY, WEEKLY, MONTHLY, TOTAL. 3. Counting starts when the limit is created, excluding prior spend. Daily windows reset at 00:00 UTC, weekly on Monday and monthly on the 1st. Never is a total limit with no periodic reset. 4. Changing only the amount preserves counting. Changing interval, or removing and re-adding a budget, starts fresh. There is no reset action; raise or remove an exhausted total limit. 5. For programmatic changes, createApiKey and updateApiKey accept spendLimit; null removes limits. The dialog manages one budget; storage permits at most one limit per interval. 6. Members with gateway:invoke can budget their own keys and edit budgets they set. Admins with gateway:manage can edit every budget; a member cannot undo an admin's budget. 7. Expect HTTP 429 with spend_limit_exceeded when the counter reaches the limit. Retry-After gives the window end and is omitted for total limits. The Budget badge warns at 80% and shows an error when reached.
Limits and open questions
- Requests already in flight finish; streams ending before usage reporting add no spend.
- An unpriced model returns
400 spend_limit_unpriced_modelunless its provider reports billed cost. A limited key gets503if Redis or the control plane is unavailable. - Self-hosted counters require Redis 7 with
maxmemory-policy noeviction, according to the linked change. No budget amount default is stated.
Not for: Langfuse per-user gateway budgets.
Sources
- v4.83.0 release, nimarb, 2026-11-19.
- Per-key spend limit change, wochinge: "Spend budget takes an amount in USD and how it resets".
Checked
2026-11-24; read the release page and the linked change page listed above; no command was run.
Started from a post by @nimarb, packaged by the editor. Original post