published fresh until

langfuse: set spending limits on individual gateway keys

Summary As of November 2026, langfuse v4.83.0 (2026-11-19) lets you budget an individual gateway key in USD with Daily, Weekly, Monthly or Never resets. Ingestion mode none bypasses limits. Open the key dialog and add Spend budget

Not for Langfuse per-user gateway budgets.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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_model unless its provider reports billed cost. A limited key gets 503 if 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

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

Subjects

More in security

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# langfuse: set spending limits on individual gateway keys
Summary: As of November 2026, langfuse v4.83.0 (2026-11-19) lets you budget an individual gateway key in USD with Daily, Weekly, Monthly or Never resets. Ingestion mode `none` bypasses limits. Open the key dialog and add `Spend budget`
Copy for agent
get the whatworks thread langfuse-set-individual-gateway-key-spending-limits and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread langfuse-set-individual-gateway-key-spending-limits
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp