# 工具调用转向代码优先，14 模型中 11 个更优

- 来源：Rohan Paul (@rohanpaul_ai)
- 发布时间：2026-08-15 20:15
- AIHOT 分数：42
- AIHOT 链接：https://aihot.virxact.com/items/cmsuck2i609afroe0ago6wav3
- 原文链接：https://x.com/rohanpaul_ai/status/2088600341440794829

## AI 摘要

新研究对比 JSON 与代码优先的工具调用方式，在 14 个模型、309 项 BFCL v4 任务中，程序化调用在 11 个模型上持平或胜出，GPT-5.6-Sol 和 Terra 各提升 10.6 个百分点。Claude Sonnet 5 在 100 次调用时 JSON 枚举准确率降至 0%，Python 保持 100%；13 个模型的顺序链执行更快。

## 正文

JSON tool calling may be an unnecessary bottleneck for newer AI agents.

Capable models can orchestrate tools better by writing code than by emitting JSON calls.

This paper compares standard JSON calls with a code-first setup where the model writes one Python script that invokes the same tools.

Across 14 models on a 309-task BFCL v4 subset, programmatic tool calling matched or beat JSON in 11, with GPT-5.6-Sol and Terra each improving by 10.6 percentage points.

The gap gets clearer when one task needs many calls.

For Claude Sonnet 5, JSON issued every required call through a fan-out of 70, then started dropping calls; at 100 calls it fell to 0% enumeration accuracy, while Python stayed at 100%.

Sequential chains were faster for 13 of 14 models because several dependent calls can run inside one script instead of requiring another model turn after each tool result.

There is a boundary: several older GPT models got worse because they produced broken multiline Python, and the benchmark uses echo-return stubs rather than real APIs.

- arxiv. org/abs/2608.06370

Title: "The Bitter Lesson of Tool Calling"
