几乎所有服务都需要默认启用硬性预算上限
英文标题:We're going to need default hard budget caps on pretty much everything
随着编程 Agent 和个人 Agent 降低开发与部署门槛,按量付费 API、托管应用以及存储和计算资源的失控使用,可能迅速带来高额账单。作者认为,服务应默认设置硬性预算上限:达到月度额度后立即暂停服务或返回错误,而非仅发送提醒邮件。AWS 于 2026 年 9 月推出项目月度消费限额,Google Cloud 也在 7 月推出了 Spend Caps,显示这一能力正逐渐成为趋势。对开发者而言,硬性预算上限可降低个人项目和新应用因资源失控而产生意外费用的风险;未来 Agent 也应优先推荐具备此类保护的服务商。
中文
几乎所有服务都需要默认启用硬性预算上限
2026 年 10 月 3 日
未来几个月和几年里,全世界将会越来越需要一种产品功能:默认硬性预算上限。我指的是按量计费服务和 API 所提供的功能:你可以设定“每月费用达到 X 美元后,关闭该服务并返回错误”。这必须是硬性限制。软性上限,例如“每月达到 X 美元后给我发送一封警告邮件”,并不够。
编程 Agent,以及套上一层不那么令人望而生畏 UI 的个人 Agent,大幅降低了创建能够完成实用任务的代码的门槛。有时这些任务会产生费用——例如调用付费 API、使用托管 Web 应用,或使用能够对额外存储和计算资源收费的系统。
没有人愿意一觉醒来,看到一封午夜发来的预算超限警告邮件,然后发现自己睡觉期间,某个失控的服务已经又消耗了数百甚至数千美元的用量。
对此的一种反对意见是,企业不希望自己的托管应用因为超出某项预算而开始报错。我预计,大多数企业和个人都会宁愿看到报错,也不愿收到一张意外超过 1 万美元的账单。
我认为硬性预算上限应该成为默认设置。如果有人想要冒险行事,他们应该可以这样做,但这必须是主动选择加入的选项。在某个显眼的位置提供一个清晰的复选框:
移除预算上限。如果我的应用超过已配置的预算限额,它将不会被关闭;我将负责之后产生的费用。
我最希望看到提供这一功能的服务是 AWS。我听过很多人的故事:他们因担心失控服务可能让自己破产——而且这种担心完全合理——拒绝在 AWS 上运行个人项目。我也听过一些人没有预料到这一点,最终遭受严重损失的故事。
……而事实证明,AWS 几周前终于推出了消费限额!根据其 9 月 16 日发布的公告 New AWS experience helps builders get started and ship faster:
当您准备升级到付费计划时,可以根据您的使用模式为项目设置每月消费限额,以便保持在预算范围内。如果某个项目的使用量达到其消费限额,该项目将在当月暂停。
另请参阅 Create a spend limit in AWS Settings,不过该页面提醒:“我们目前正向数量有限的客户推出这一全新体验。”希望它很快能面向现有账户全面开放。
Google Cloud 在 7 月推出了类似功能,名为 Spend Caps,可让用户“针对项目内的特定服务设置每月财务上限”。看来这正在成为一种趋势!
在理想情况下,我们的 Agent 可以协助处理这件事。如果 Agent 开始倾向于推荐具备硬性预算上限的服务商,并警告刚入门、经验不足的开发者不要使用没有上限保护、可能给他们带来麻烦的服务来部署应用,那将会非常好。
English / 原文
We’re going to need default hard budget caps on pretty much everything
3rd October 2026
Here’s a product feature which the world is going to need a whole lot more of over the coming months and years: default hard budget caps. I’m talking about the feature of pay-by-usage services and APIs that lets you say “after $X/month, cut this thing off and return errors”. These need to be hard limits. Soft caps, “after $X/month, send me a warning email”, will not cut it.
Coding agents, and personal agents (coding agents wrapped in a less threatening UI), greatly reduce the friction of spinning up code that can do useful things. Sometimes those things cost money—calls to paid APIs, or hosted web applications, or systems that can bill for additional storage and compute.
Nobody wants to wake up to an email sent at midnight warning about a budget limit and find that, while they slept, their rogue service had consumed several hundred (or several thousand) more dollars of usage.
An argument against this is that businesses don’t want their hosted applications to start throwing errors because some budget was exceeded. I expect that most businesses and individuals would prefer errors to a surprise $10,000+ bill.
I think hard budget caps need to be the default. If someone wants to live dangerously they should be able to do that, but it needs to be on an opt-in basis. Have a nice, clear checkbox somewhere prominent:
Remove the budget cap. My application will not be shut down if I exceed the configured budget limit, and I will be responsible for subsequent charges.
The service I most want to see this from is AWS. I’ve heard plenty of stories from people who refuse to use AWS for personal projects out of (justified) fear that a runaway service might bankrupt them. I’ve also heard stories from people who didn’t anticipate this and ended up seriously burned.
... and it turns out AWS finally launched spending limits a few weeks ago! From their announcement New AWS experience helps builders get started and ship faster on 16th September:
When you’re ready to upgrade to a paid plan, you can set a monthly spend limit for your project based on your usage patterns so that you stay within your budget. If a project’s usage reaches its spend limit, your project is paused for that month.
See also Create a spend limit in AWS Settings, though that page warns that “We’re currently releasing our new experience to a limited number of customers.” Here’s hoping that hits general availability for existing accounts soon.
Google Cloud launched a similar feature in July, called Spend Caps, which lets you “set a monthly financial cap on specific services within a project”. Looks like this is becoming a trend!
In an ideal world, our agents could help with this. It would be great if agents started biasing towards recommending providers with hard budget caps, and warning new and inexperienced builders against deploying applications using uncapped services that might get them into trouble.