PulseAugur
实时 14:59:33
English(EN) The vendor documents this bug. A 30k-star repo shipped it anyway.

流行的 Claude 代码仓库因已知错误而过度计算 token

一位开发者在流行的 `claude-code-templates` 仓库中发现了一个重大错误,该错误导致 token 使用量被多计算了 2.35 倍。问题源于代码对消息使用量的计算方式,它会为单个助手消息中的每个内容块多次计算 token。Anthropic 在其 Agent SDK 文档中记录了此问题,甚至提供了一个修复的参考实现,但这个错误仍然存在于这个广泛使用的模板仓库中。开发者指出,一个简单的断言检查不同的消息 ID 与记录计数是否一致,本可以立即发现这个问题。 AI

影响 由于未解决的 token 计算错误,凸显了 AI 代理开发中成本超支的潜在风险。

排序理由 开发者识别并记录了一个与 LLM token 计算相关的流行开源代码仓库中的错误。

在 dev.to — LLM tag 阅读 →

AI 生成摘要 · Google Gemini · 来自 1 个来源。 我们如何撰写摘要 →

流行的 Claude 代码仓库因已知错误而过度计算 token

报道来源 [1]

  1. dev.to — LLM tag TIER_1 English(EN) · Li Zhuojun ·

    The vendor documents this bug. A 30k-star repo shipped it anyway.

    <p>This is part three of a series about pointing an append-only audit log at things that count tokens. <a href="https://dev.to/lizhuojunx86/a-missing-model-line-was-half-my-ai-agent-overspend-auditing-34-days-of-multi-model-claude-code-mc7">Part one</a> found that a single missin…