AI觉醒星球
Awakening is here
Knowledge File / AI小生意项目库
2026-07-05 0 浏览 会员

更好的模型:更差的工具

Armin报告了一个奇怪问题:新版的Claude模型(Opus 4.8和Sonnet 5)在调用Pi的编辑工具时,会在嵌套的edits[]数组中添加额外的虚构字段,导致工具调用被拒绝,而旧模型没有这个问题。作者猜测是因为Anthropic最新模型被训练为更好地使用Claude Code内置的编辑工具,反而使第三方工具使用错误。

SOURCE / AI小生意项目库 MIN / 4 ACCESS / 会员 POST / 2026-07-05 06:53:52

原贴

查看原文
作者:Simon Willison 来源站点:simonwillison.net 原贴时间:

原文

Better Models: Worse Tools Armin reports on a weird problem he ran into while hacking on Pi: The short version is that newer Claude models sometimes call Pi’s edit tool with extra, invented fields in the nested edits[] array. And not Haiku or some small model: Opus 4.8. The edit itself is usually correct but the arguments do not match the schema as the model invents made-up keys and Pi thus rejects the tool call and asks to try again. That alone is not too surprising as models emit malformed tool calls sometimes. Particularly small ones. What surprised me is that this is getting worse with newer Anthropic models as both Opus 4.8 and Sonnet 5 show it but none of the older models. In other words, the SOTA models of the family are worse at this specific tool schema than their older siblings. Armin theorizes that this is because more recent Anthropic models have been specifically trained (presumably via Reinforcement Learning) to better use the edit tools that are baked into Claude Code. This has the unfortunate effect that other coding harnesses, such as Pi, may find that their own custom edit tools are more likely to be used incorrectly. Claude's edit tool uses search and replace . OpenAI's Codex uses an apply_patch mechanism instead , and OpenAI have talked in the past about how their models are trained to use that tool effectively. Does this mean third-party coding harnesses like Pi should implement multiple edit tools just so they can use the one with the best performance for the underlying model the user has selected? Tags: armin-ronacher , ai , openai , generative-ai , llms , anthropic , llm-tool-use , coding-agents , pi

中文翻译

Armin 报告了他在开发 Pi 时遇到的一个奇怪问题:简而言之,较新的 Claude 模型有时会在嵌套的 edits[] 数组中调用 Pi 的编辑工具,并带有额外的、虚构的字段。而且不是 Haiku 或某个小模型:是 Opus 4.8。编辑本身通常是正确的,但参数不符合模式,因为模型发明了伪造的键,Pi 因此拒绝工具调用并要求重试。这本身并不太令人惊讶,因为模型有时会发出格式错误的工具调用。特别是小模型。令我惊讶的是,随着新 Anthropic 模型的推出,这种情况变得更糟,Opus 4.8 和 Sonnet 5 都表现出这种情况,但旧模型都没有。换句话说,该系列中最先进的模型在特定工具模式上比它们的旧版本更差。Armin 推测,这是因为较新的 Anthropic 模型经过专门训练(大概是通过强化学习)以更好地使用 Claude Code 中内置的编辑工具。这带来了不幸的后果,即其他编码工具(如 Pi)可能会发现它们自己的自定义编辑工具更可能被错误使用。Claude 的编辑工具使用搜索替换。OpenAI 的 Codex 使用 apply_patch 机制,OpenAI 过去曾谈论过他们的模型如何被训练以有效使用该工具。这是否意味着像 Pi 这样的第三方编码工具应该实现多种编辑工具,以便它们能够为用户选择的底层模型使用性能最佳的编辑工具?

核心信息

Armin报告了一个奇怪问题:新版的Claude模型(Opus 4.8和Sonnet 5)在调用Pi的编辑工具时,会在嵌套的edits[]数组中添加额外的虚构字段,导致工具调用被拒绝,而旧模型没有这个问题。作者猜测是因为Anthropic最新模型被训练为更好地使用Claude Code内置的编辑工具,反而使第三方工具使用错误。

  • Armin报告了一个奇怪问题:新版的Claude模型(Opus 4.8和Sonnet 5)在调用Pi的编辑工具时,会在嵌套的edits[]数组中添加额外的虚构字段,导致工具调用被拒绝,而旧模型没有这个问题。作者猜测是因为Anthropic最新模型被训练为更好地使用Claude Code内置的编辑工具,反而使第三方工具使用错误。
  • 原贴提到:Better Models: Worse Tools Armin reports on a weird problem he ran into
  • 来源:simonwillison.net
试看内容

成为会员查看完整内容

你已经看到了这篇内容的前置整理,剩余深度部分仅对会员开放。

详细解读 信息差价值 参考来源
成为会员查看完整内容
上一篇 AI搜索代理的失败不在于搜索,而在于查询模糊时不会提出正确问题 下一篇 谷歌新广告想象在AI帮助下起草独立宣言