在同一客服 Agent、多步工具编排、错误恢复、长上下文一致性三个场景下,对 GPT-5.6 与 Claude Sonnet 4.5 做了详细 Benchmark,发现 GPT-5.6 工具调用拒绝率从 12% 降至 4% 以下。
7 月 9 日 GPT-5.6 发布后,我们花了两周时间在两个模型上运行相同的 Agent 工作负载。我们最感兴趣的一项声明改进:GPT-5.6 的工具调用拒绝率降至 4% 以下,而 GPT-5.5 约为 12%。对于生产环境中的 Agent 系统,这个单一数字比任何基准排行榜名次都重要得多。
Claude Sonnet 4.5 一直是我们大多数 Agent 工作的默认选择。我们想知道这是否应该改变。
简短回答:取决于你的任务形态。以下是数据。
我们选取了三个 Agent 场景来隔离不同的失败模式:
任务 A:多步工具编排 一个客户服务 Agent,需要链式调用四个工具:订单查询、保单检索、退款处理、CRM 更新。衡量模型是否能可靠地按正确顺序调用所有必需工具。
任务 B:工作流中途的错误恢复 同一个 Agent,但在第 2 和第 3 个工具调用处注入故意的失败。衡量模型是智能重试、产生有意义的错误响应,还是静默失败。
任务 C:长上下文一致性 一个研究综合 Agent,在 80K token 的先前对话上下文上运行,工具调用散布其中。衡量模型是否会在后期丢失对早期决策的跟踪。
每个任务、每个模型各运行 200 次试验。测试的模型:GPT-5.6 Terra(平衡档,$2.5 输入 / $15 输出 每百万 token)和 Claude Sonnet 4.5。
两个模型的工具设置完全相同。以下是核心循环:
import anthropic
from openai import AsyncOpenAI
import asyncio
from typing import Literal
# Shared tool definitions
TOOLS_CLAUDE = [
{
"name": "lookup_order",
"description": "Retrieve order details and status",
"input_schema": {
"type": "object",
"properties": {
"order_id": {"type": "string"},
"customer_id": {"type": "string"}
},
"required": ["order_id", "customer_id"]
}
},
{
"name": "check_refund_policy",
"description": "Verify whether an order is eligible for refund",
"input_schema": {
"type": "object",
"properties": {
"order_id": {"type": "string"},
"order_date": {"type": "string"},
"customer_tier": {"type": "string"}
},
"required": ["order_id", "order_date"]
}
},
{
"name": "process_refund",
"description": "Initiate refund for an eligible order",
"input_schema": {
"type": "object",
"properties": {
"order_id": {"type": "string"},
"refund_amount": {"type": "number"},
"reason": {"type": "string"}
},
"required": ["order_id", "refund_amount", "reason"]
}
},
{
"name": "update_crm_record",
"description": "Log refund action in CRM",
"input_schema": {
"type": "object",
"properties": {
"customer_id": {"type": "string"},
"action": {"type": "string"},
"resolution": {"type": "string"}
},
"required": ["customer_id", "action"]
}
}
]
async def run_claude(order_id: str, customer_id: str) -> dict:
client = anthropic.AsyncAnthropic()
messages = [
{
"role": "user",
"content": f"Process a refund for order {order_id} for customer {customer_id}. "
f"Check eligibility, process if eligible, and update the record."
}
]
tool_calls_made = []
while True:
response = await client.messages.create(
model="claude-sonnet-4-5",
max_tokens=1024,
system="You are a customer service agent. Always complete all required steps.",
tools=TOOLS_CLAUDE,
messages=messages
)
if response.stop_reason == "end_turn":
break
if response.stop_reason == "tool_use":
tool_uses = [b for b in response.content if b.type == "tool_use"]
tool_calls_made.extend([t.name for t in tool_uses])
# Add assistant response and tool results to messages
messages.append({"role": "assistant", "content": response.content})
tool_results = []
for tool_use in tool_uses:
result = await execute_tool(tool_use.name, tool_use.input)
tool_results.append({
"type": "tool_result",
"tool_use_id": tool_use.id,
"content": str(result)
})
messages.append({"role": "user", "content": tool_results})
return {
"model": "claude-sonnet-4-5",
"tools_called": tool_calls_made,
"complete": set(tool_calls_made) == {"lookup_order", "check_refund_policy",
"process_refund", "update_crm_record"}
}
async def run_gpt56(order_id: str, customer_id: str) -> dict:
client = AsyncOpenAI()
# Convert Claude tool format to OpenAI format
messages = [
{"role": "system", "content": "You are a customer service agent. Complete all required steps."},
{"role": "user", "content": f"Process refund for order {order_id}, customer {customer_id}."}
]
tool_calls_made = []
while True:
response = await client.chat.completions.create(
model="gpt-5.6-terra",
messages=messages,
tools=[convert_to_openai_format(t) for t in TOOLS_CLAUDE],
tool_choice="auto"
)
message = response.choices[0].message
if message.tool_calls is None:
break
messages.append(message)
tool_calls_made.extend([tc.function.name for tc in message.tool_calls])
for tool_call in message.tool_calls:
result = await execute_tool(
tool_call.function.name,
json.loads(tool_call.function.arguments)
)
messages.append({
"role": "tool",
"tool_call_id": tool_call.id,
"content": str(result)
})
return {
"model": "gpt-5.6-terra",
"tools_called": tool_calls_made,
"complete": set(tool_calls_made) == {"lookup_order", "check_refund_policy",
"process_refund", "update_crm_record"}
}

GPT-5.6 Terra 改进后的工具调用可靠性是真实的、可衡量的。文档记载的拒绝率从约 12% 下降这一点在生产结果中得到了体现。Claude Sonnet 4.5 每个任务成本略低、响应更快,但掉工具调用的频率大约是 GPT-5.6 的两倍。
对于每个工具调用都至关重要的场景——金融操作、订单变更、任何有下游影响的工作——可靠性差距有真实的成本。
我们在第 2 和第 3 个工具调用处注入失败,以测试恢复行为。第 2 个工具调用返回 503。第 3 个工具调用返回格式错误的 JSON 响应。
async def execute_tool_with_failures(
tool_name: str,
inputs: dict,
failure_map: dict # {"check_refund_policy": "503", "process_refund": "malformed"}
) -> str:
if tool_name in failure_map:
failure_type = failure_map[tool_name]
if failure_type == "503":
return json.dumps({
"error": "Service temporarily unavailable",
"code": 503,
"retry_after": 2
})
if failure_type == "malformed":
return "{{invalid json response}}" # Intentionally broken
# Normal execution
return await execute_tool(tool_name, inputs)
我们观察的指标:模型是智能重试、清晰传达失败,还是静默跳过失败的步骤并假装工作流已完成继续下去。
静默继续是危险的失败模式——Agent 告诉客户退款已处理,但实际没有。
Claude Sonnet 4.5 的失败行为:面对 503 错误,Claude 在 91% 的案例中明确承认了失败,并要么重试、要么升级处理。面对格式错误的响应,Claude 在 88% 的案例中提供了清晰的错误信息。在约 9% 的格式错误响应案例中,Claude 产生了暗示成功但未确认操作已完成的回复。
GPT-5.6 Terra 的失败行为:面对 503 错误,GPT-5.6 在 93% 的案例中重试或明确升级处理。面对格式错误的 JSON,它在 91% 的案例中提供了清晰的错误信息。静默继续率约为 7%。
两个模型在没有编排层显式错误处理的情况下都不是完全可靠的。在向用户报告成功之前,两者都需要一个验证步骤。
上下文大小:80K token 的先前对话历史,包含散布其中的 15 个工具调用。
我们测试了每个模型在对话深处进行工具调用时是否能保持对早期决策的准确回忆。
这正是上下文窗口差异开始起作用的地方。Claude Sonnet 4.5 有 200K 窗口。GPT-5.6 Enterprise 有 1.5M。在这个 80K 测试中,两个模型都在窗口范围内。
在 80K 上下文下,两个模型表现相当。Claude 在 88% 的试验中保持了早期决策一致性。GPT-5.6 Terra 在 87% 的试验中保持了一致性。
真正的差异在上下文超过 150K token 时显现。这正是 Claude 的 200K 窗口开始成为约束、而 GPT-5.6 的 1.5M 窗口不再只是理论优势的地方。
对于大多数企业 Agent 任务——客户服务、销售自动化、运营工作流——80K 足够了。1.5M 窗口优势对于法律文档审查、大型代码库分析和合规审计工作负载是有意义的。
基于三个任务类型共 600 次试验:
GPT-5.6 Terra / Sol 适用于:
Claude Sonnet 4.5 适用于:
路由方案:我们得出的最佳生产架构不是二选一,而是按任务复杂度路由:轻量查询走 Claude Haiku 或 GPT-5.6 Luna,标准 Agent 任务走 Claude Sonnet 4.5 或 Terra,架构级推理走 Claude Opus 或 GPT-5.6 Sol。
async def route_by_complexity(task: AgentTask) -> str:
if task.estimated_tokens < 2000 and task.tool_calls_required < 2:
return "claude-haiku-4-5" # Fast, cheap
if task.tool_calls_required >= 5 or task.context_size > 100_000:
return "claude-opus-4-5" # Complex reasoning
if task.requires_document_analysis and task.context_size > 180_000:
return "gpt-5.6-sol" # Large context
# Default: either works, pick by cost
return "claude-sonnet-4-5" # Slight cost advantage at scale
工具调用可靠性是决定你的 Agent 在生产环境中是否可用的指标。在 4% 失败率对比 12% 的情况下,在 10 步工作流中的差异是累积的:
GPT-5.6 在这一指标上的文档记载改进,是它值得认真评估用于新的复杂 Agent 构建的原因。
但模型不是故事的全部。工具定义、错误处理、编排逻辑和恢复模式对生产可靠性的影响,与模型选择一样大。我们见过架构良好的 Claude 部署在每个重要指标上都胜过架构不佳的 GPT-5.6 配置。
模型选择取决于你的任务形态。对于正在构建生产 Agent 的团队,与专家合作可以省去几个月的试错。以下是擅长这两个 API 的顶级 ChatGPT 开发公司和团队:
顶级 ChatGPT 开发公司
Dextra Labs 为企业客户构建生产级 AI Agent 系统。我们横跨 OpenAI 和 Anthropic API 工作——正确的模型取决于任务,而不是营销。hello@dextralabs.com