Cloudflare adds Workers spending limits, with separate budgets for AI calls
Edited and reviewed by AI Ping Editorial Team
3-line summary
- Cloudflare opened its Spend Management beta for Workers and Durable Objects to pay-as-you-go customers.
- An enforced limit can block new work across an account. An email-only alert keeps the product running.
- An app can still use the existing AI Gateway budgets for model requests routed through it.
Cloudflare opened its Spend Management beta to pay-as-you-go customers on November 13. It starts with Workers, which runs application code, and Durable Objects, which can hold state such as a conversation across requests. An account can set separate spending thresholds for the two products. With a spending limit enabled, Cloudflare blocks new operations covered by the policy once enforcement takes effect. An email-only alert leaves the product running.
Consider a chatbot that receives messages through a Worker and keeps conversation state in a Durable Object. The two products accrue usage toward their own thresholds. The model that writes a reply adds another cost. Cloudflare points to the existing budgets in AI Gateway for model requests that pass through it. For a team running that chatbot, the budget rules can apply at different points along the path from a user's message to a reply.
A test Worker shares the production limit
Cloudflare adds up request and CPU charges from all Workers on the account. If usage from a test Worker exhausts the shared budget, new requests to a production chatbot in the same account can fail. The block reaches scheduled runs and queue consumers as well as HTTP traffic. Static files that are served without executing Worker code can remain accessible, so the public page may still open even when the request that generates a reply fails.
For Durable Objects, Cloudflare can reject new requests to an object and block SQLite reads and writes once the limit takes effect. It holds pending alarms during the pause and deletes a held alarm if it was scheduled more than seven days earlier. Messages can still pass over an open WebSocket, and data kept in storage can continue to generate charges. An app that depends on both products can encounter separate blocks.
Cloudflare's changelog gives an example in which a team sets Workers alerts at $5 and $9 and sets the block at $10. There can be a delay between recording that the expense reached the threshold and enforcing the block. The billing documentation says delays, work already under way, and ongoing charges such as storage and subscription fees can leave the final bill above the specified amount.
The account's billing dashboard shows recorded spending and whether the product has reached its threshold. The audit log records who changed a limit and when. Cloudflare says a recorded threshold event by itself cannot establish whether a block is in place or whether the email has been delivered.
AI Gateway counts model requests separately
AI Gateway uses token consumption to estimate the cost of routed requests for models with known prices. A budget can apply to a particular model or provider. Teams can also use a user identifier carried on the request to give each employee of an internal chatbot a separate budget. A budget shared by everyone using a given model is another option.
When an applicable gateway budget is exhausted, the default block returns HTTP 429 on further matching requests until the budget window resets. With a budget per user, someone whose allocation is spent can be blocked while colleagues can still call the same model within their own allocations. The gateway counts calls routed through it.
The block expires at the start of the next billing period
Spend Management uses the product's subscription cycle. Its dollar total reflects estimated usage charges after included usage has been deducted. On an account that renews on the 15th, the block expires when the new cycle starts on that date, with the spending limit still configured. Charges recorded earlier in the current period count toward a newly set limit, and lifting a block by changing a limit can take a few minutes.
Cloudflare also outlined plans to group spending by application or agent across several products. That could let an account track model calls, compute and storage for one agent together. The company gave no release date for that wider scope in its announcement.
Sources
- 지출 관리 베타 발표 · Introducing Spend Management — Cloudflare Blog
- 출시 범위와 알림 예시 · Spending limits for Workers and Durable Objects — Cloudflare Changelog
- 제품별 지출 한도와 구독 주기 · Billing spending limits and alerts — Cloudflare Docs
- 워커스의 처리 중단 범위 · Workers spending limits — Cloudflare Docs
- 듀러블 오브젝트의 예약 작업과 차단 · Durable Objects spending limits — Cloudflare Docs
- 모델 호출 예산 · AI Gateway spend limits — Cloudflare Docs