跳到主内容
@wquguru
精选88MIT Technology Review AI(RSS)技巧与观点

停止按Token计费,转向衡量交付成果的工程实践

Stop counting tokens, start counting what ships

原文
发到 X
推荐理由

Agent时代成本失控是普遍痛点,这篇提供了从度量指标到架构选型的具体落地方案,HPE的数据验证了可行性,值得工程团队参考。

When a developer gives an AI agent a coding task, the agent does more than answer once. It plans, generates code, runs tests, and repeats the process to correct errors. A single task can use 10 to 50 times more tokens than a basic chat prompt. The more useful the agent becomes, the more calls it makes. With per-token pricing, the workflows creating the most value can also become the most expensive.

当开发者向 AI 代理下达编码任务时,代理的工作不止于回答一次。它会进行规划、生成代码、运行测试,并重复该过程以纠正错误。单个任务消耗的 token 数量可能是基本聊天提示的 10 到 50 倍。代理越有用,它发起的调用就越多。在按 token 计费的模式下,创造最大价值的工作流也可能成为最昂贵的部分。

The financial pressure is already visible. Uber reportedly exhausted its entire 2026 AI budget by April after expanding its use of Claude Code. GitHub Copilot moved from flat-rate pricing to metered credits. Gartner predicts that AI coding token costs will surpass average developer salaries by 2028.

财务压力已经显现。据报道,Uber 在扩大使用 Claude Code 后,到四月就已耗尽了其 2026 年的全部 AI 预算。GitHub Copilot 从固定费率定价转向了按量计费积分模式。Gartner 预测,到 2028 年,AI 编码 token 的成本将超过开发者的平均薪资。

The natural response is rationing usage caps, seat limits, and approvals before developers launch agents. But blanket limits can restrict the workflows delivering value. They also optimize the wrong number. Cost per token measures consumption, not results. Some spending reflects waste, including retries and runaway loops. Some represents the work of shipping software. A meter cannot distinguish them, and neither can a spending cap.

自然的应对措施是限制用量上限、席位限制,并在开发者启动代理前要求审批。但一刀切的限制可能会阻碍那些产生价值的工作流。它们也优化了错误的指标。每个 token 的成本衡量的是消耗量,而非结果。部分支出反映了浪费,包括重试和失控循环。部分则代表了交付软件的工作。计量器无法区分它们,支出上限同样无法做到。

Measure the software that ships

衡量交付的软件

A better measure is cost per merged pull request: total AI-assisted development cost divided by the number of changes that pass review and are merged. Track rework and defects alongside it so cheaper changes do not conceal lower quality.

更好的衡量标准是每个合并拉取请求(Pull Request)的成本:即总 AI 辅助开发成本除以通过审查并被合并的变更数量。同时跟踪返工和缺陷,以免较低的变更成本掩盖了较低的质量。

If that cost falls as AI usage rises, without compromising quality, developers are converting more consumption into useful software. The question is not how many tokens they use, but how much finished work the investment produces.

如果随着 AI 用量的增加,该成本下降且质量未受影响,说明开发者正将更多的消耗转化为有用的软件。问题不在于他们使用了多少 token,而在于这项投资产生了多少成品工作。

Improving that equation requires two changes: reserve expensive inference for tasks that need it, and lower the cost of routine work.

改善这一等式需要两项改变:为需要它的任务保留昂贵的推理能力,并降低常规工作的成本。

Match the model to the task

根据任务匹配模型

Agentic coding does not require the most powerful model at every step. Use a frontier model, or an on-premises flagship when policy requires it, for difficult planning and novel reasoning. Route suitable work, including code generation, test creation, and repeated refactoring, to open-weight models you operate yourself.

代理式编码并不需要在每一步都使用最强大的模型。当策略要求时,对复杂的规划和新颖的推理使用前沿模型或本地部署的旗舰模型。将合适的工作,包括代码生成、测试创建和重复重构,路由到你自行运营的开源权重模型上。

A gateway can route requests according to task complexity, data sensitivity, cost, and latency. This reserves premium inference for the moments that justify it rather than applying premium pricing to an entire workflow. Meter the exception, not the workload.

网关可以根据任务复杂度、数据敏感性、成本和延迟来路由请求。这将把高级推理资源保留给值得投入的时刻,而不是对整个工作流应用高级定价。对异常情况进行计量,而非对工作负载。

Open-weight models make this division increasingly practical. Software-engineering benchmarks show that leading open-weight models can approach frontier performance on some tasks. That does not establish equivalence across every repository or workflow. Evaluate candidates against your own code, tests, and acceptance criteria before assigning production work.

开放权重模型使这种分工日益可行。软件工程基准测试表明,领先的开放权重模型在某些任务上可以接近前沿性能。但这并不能证明在所有代码库或工作流中都等效。在分配生产环境工作之前,请针对你自己的代码、测试和验收标准评估候选模型。

Change the economics of repeated use

改变重复使用的经济结构

Next, decide who owns the capacity. With rented inference, every call adds to the bill. With owned capacity, most of the cost is committed upfront, so each additional call gets cheaper as usage grows.

接下来,确定谁拥有算力容量。对于租赁推理服务,每次调用都会增加账单;而对于自有容量,大部分成本需预先投入,因此随着使用量的增长,每次额外调用的成本会降低。

The economics are simple: per-token pricing makes heavy use more expensive, while owned capacity becomes more efficient as teams use it more. Ownership is not free, though. Power, operations, maintenance, and depreciation all must be considered. The number that matters is the fully loaded cost per merged pull request.

经济逻辑很简单:按 token 定价使得重度使用成本更高,而自有容量随着团队使用频率的增加而变得更高效。然而,拥有容量并非没有代价。必须考虑电力、运维、维护和折旧等因素。关键指标是每次合并拉取请求(pull request)的全口径成本。

Owned capacity also delivers a type of value that never appears on an invoice: control over sensitive code. When code generation and testing run on-premises, proprietary code stays inside the enterprise. Only approved planning prompts and governed exceptions go to external models, through a gateway the organization controls. That opens the sensitive repositories where security usually stalls adoption, and where the biggest gains are waiting.

自有容量还带来一种永远不会出现在发票上的价值:对敏感代码的控制权。当代码生成和测试在本地运行时,专有代码保留在企业内部。只有经过批准的规划提示词和受控的例外情况才会通过组织控制的网关发送到外部模型。这打开了那些通常因安全问题而阻碍采用的敏感代码库,而那里正蕴藏着最大的收益。

Test the operating model

测试运营模式

At HPE, a hybrid AI platform routes routine workloads from more than 150 internal applications to open-weight models running on premises, including on HPE Private Cloud AI. The result: token costs down 30 to 50%.

在 HPE,混合 AI 平台将来自 150 多个内部应用程序的日常负载路由到运行在本地(包括 HPE Private Cloud AI)的开放权重模型上。结果是:token 成本降低了 30% 到 50%。

That is the point of hybrid. With HPE Private Cloud AI, owning your inference does not mean giving up frontier models. Run the volume on capacity you own and let a gateway send the hardest work.

这正是混合模式的意义所在。使用 HPE Private Cloud AI,拥有自己的推理能力并不意味着放弃前沿模型。在你拥有的容量上处理常规负载,并通过网关发送最复杂的工作。

Data also shows that usage, not licensed headcount, drives spend. The top 5% of users generated most of the consumption, and the heaviest used roughly 450 times more than the lightest on the same license. If power users grow from a small minority to half the workforce, monthly spend can rise about 4.4 times with flat headcount. Your mix will differ, which is exactly why you need to measure it.

数据还显示,驱动支出的是使用量而非许可员工数。前 5% 的用户产生了大部分的消耗量,重度用户的使用次数大约是轻度用户的 450 倍(在同一许可下)。如果重度用户从少数群体增加到占 workforce 的一半,在员工总数不变的情况下,月度支出可能上升约 4.4 倍。你的具体情况会有所不同,这也正是你需要进行测量的原因。

HPE tracks two metrics and recommends customers do the same. First, it tracks cost per active developer, because averaging across all licenses hides the power users driving spend. Second, it tracks cost per merged pull request, because it connects AI spending to software that ships.

HPE 跟踪两项指标,并建议客户也这样做。首先,它跟踪每位活跃开发者的成本,因为对所有许可进行平均会掩盖推动支出的重度用户。其次,它跟踪每次合并拉取请求的成本,因为它将 AI 支出与最终交付的软件联系起来。

Baseline both costs before changing infrastructure. Then run a complete development cycle on owned capacity. If both metrics do not improve as usage grows, your current model may still be the better choice.

在更改基础设施之前,先建立成本基线。然后在自有容量上运行完整的开发周期。如果随着使用量的增长,这两项指标均未改善,则您当前的模式可能仍是更优选择。

Build for adoption, not rationing

为普及而构建,而非配给

Owned capacity is not for everyone. Low or unpredictable usage favors APIs, with no capital tied up in idle infrastructure. Ownership pays off when sustained demand keeps it busy. Most enterprises will run hybrid: frontier APIs for demanding or intermittent work, owned capacity for repeatable volume. A governed gateway decides what leaves the building, so you get frontier models without giving up sovereignty over your code.

自有容量并非适合所有人。低使用量或不可预测的使用量更适合使用 API,因为无需将资本锁定在闲置的基础设施中。当持续的需求使其保持繁忙时,自有容量的投资才会产生回报。大多数企业将采用混合模式:对需求高或使用间歇性的工作负载使用前沿 API,对可重复的大批量工作负载使用自有容量。受管控的网关决定哪些流量可以流出,这样您既能获得前沿模型的能力,又不会丧失对代码的主权。

As developers lean harder on coding agents, usage will keep rising. The real choice is whether that growth shows up as a bigger variable-cost bill or as more software shipped on capacity you own. The companies that lead AI-assisted development will not ration adoption to control costs. They will build an operating model where more AI use improves the economics instead of undermining them.

随着开发人员越来越依赖编码智能体,使用量将持续上升。真正的选择在于,这种增长是体现为更高的可变成本账单,还是体现为在自有容量上交付了更多的软件。引领 AI 辅助开发的公司不会为了控制成本而限制普及程度。它们将构建一种运营模式,使更多的 AI 使用能够改善经济效益,而不是削弱它。

To learn more about HPE Private Cloud AI, please visit HPE.

如需了解更多关于 HPE Private Cloud AI 的信息,请访问 HPE。

This content was produced by HPE. It was not written by MIT Technology Review’s editorial staff.

本内容由 HPE 制作。并非由 MIT Technology Review 的编辑团队撰写。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件