Glean 拾遗
日刊 /2026-07-17 / 模型越强,工具越差:Anthropic 新模型为何在第三方编辑工具上表现倒退

模型越强,工具越差:Anthropic 新模型为何在第三方编辑工具上表现倒退

原文 simonwillison.net 收录 2026-07-17 06:00 阅读 2 min
AI 解读

Armin 在开发 Pi 代码编辑器时发现一个反直觉的问题:Claude Opus 4.8 和 Sonnet 5 等最新模型在调用 Pi 的自定义 edit 工具时,会在嵌套的 edits[] 数组中凭空生成不存在的字段,导致工具调用被拒绝。而更早的 Claude 模型则不会犯这个错误。Armin 推测这是因为 Anthropic 通过强化学习(RL)专门训练了新模型优化 Claude Code 内置的编辑工具,但这种针对性训练意外损害了模型对其他编辑工具模式的兼容性。文章讨论了第三方编码框架是否应该为不同模型实现多套编辑工具接口,以及专用训练与通用性之间的根本矛盾。

原文 2 分钟
原文 simonwillison.net ↗
§ 1

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.

Better Models: Worse Tools。Armin 报告了一个他在捣鼓 Pi 时遇到的奇怪问题:

简而言之,较新的 Claude 模型有时会在嵌套的 edits[] 数组中用额外的、凭空捏造的字段调用 Pi 的编辑工具。而且不是 Haiku 或某个小模型:是 Opus 4.8。编辑内容本身通常正确,但参数不符合 schema,因为模型发明了虚假的键,Pi 因此拒绝该工具调用并要求重试。

§ 2

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.

这本身并不太令人惊讶,因为模型有时会发出格式错误的工具调用,尤其是小模型。令我惊讶的是,这个问题在较新的 Anthropic 模型中愈演愈烈——Opus 4.8 和 Sonnet 5 都表现出此问题,而所有旧模型则没有。换句话说,该系列中的 SOTA 模型在这个特定工具 schema 上的表现比它们的旧版更差。

§ 3

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.

Armin 推测,这是因为较新的 Anthropic 模型经过了专门训练(可能通过强化学习),以更好地使用内置于 Claude Code 中的编辑工具。这产生了不幸的副作用:其他编码框架(如 Pi)可能会发现它们自己的自定义编辑工具更有可能被错误使用。

§ 4

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.

Claude 的编辑工具使用搜索和替换。OpenAI 的 Codex 则使用 apply_patch 机制,OpenAI 过去曾谈到他们如何训练模型有效使用该工具。

§ 5

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?

这是否意味着像 Pi 这样的第三方编码框架应该实现多个编辑工具,以便根据用户选择的基础模型使用性能最佳的那个?

打开原文 ↗