问题所在
没有控制平面
- 提供商的控制台告诉你花了多少,但那是花完之后。
- 一个失控的脚本或一个泄露的密钥,就能在一个下午用光一个月的预算。
- 每个团队共用同一个提供商密钥,所以没人对某个数字负责。
使用 INFRO
- 每个请求都会在调用提供商之前检查限额。
- 每个项目、成员和密钥都有自己的上限和告警阈值。
- 拒绝会指明是哪个范围拒绝的,这样合适的人就能采取行动。
运作方式
给每个工作负载各自的密钥
每个服务、智能体或开发者一个密钥,每个都在项目内。从第一个请求起就按密钥记录支出。
设定上限
组织、项目、成员和密钥层级的限额,各自可设为阻断或仅告警,告警阈值由你自己设定。
让网关来强制执行
每个请求的预估成本在调用之前先被预留。限额无法覆盖的请求会返回 402 budget_exceeded,并且永远不会到达提供商。
你能得到什么
每一项都有文档说明,并注明包含它的套餐。未注明套餐的,所有套餐都提供。
适用对象
- 工程主管给每位开发者和智能体一个带上限的密钥,不再凭信任批准支出。
- 财务每个团队一个会被强制执行的数字,而不是每个团队一个只能寄望的数字。
- 创始人失控的循环最多花掉你在该密钥上设置的限额。
实战指南
- 实战指南Does an AI spend cap hold under 500 concurrent requests?A spend cap that checks a running total and then serves the request will be passed by a burst. Here is why, how a reservation-based cap is built instead, and what a sandbox test of one did and did not show.
- 实战指南LLM spend controls: budgets, alerts, and hard limitsBudgets should guide normal growth and contain abnormal behavior. Use scoped alerts for humans and hard ceilings for the failure modes that cannot wait.
- 实战指南Coding agent costs for teams: Claude Code, Codex and capsTwo ways to pay for coding agents, the mechanics that make an agent session expensive, and a working plan for measuring spend per developer, repository and project, then capping it before the provider call.