# OpenRouter 实测 Claude Opus vs Sonnet vs Haiku 5.5 该选哪个
> 原标题:Claude Opus vs Sonnet vs Haiku: Which Should You Use?
- 来源:OpenRouter:Announcements
- 发布时间:2026-10-30T00:00:00.000Z
- AIHOT:https://aihot.news/items/gzcwy89nkjreenv5eu1qaysdi
- 原文:https://openrouter.ai/blog/insights/claude-opus-vs-sonnet-vs-haiku/
## 摘要
OpenRouter 实测 Claude Opus 5.5、Sonnet 5.5 与 Haiku 5.5 三档模型,建议默认用 Sonnet 5.5,高频与子智能体任务用 Haiku 5.5,长且容错成本高的任务用 Opus 5.5。
## 推荐理由
原文用同一批编码与基准任务实测三档模型,给出按工作负载选型的成本与可靠性结论。
## 正文 · 中文译文
把 [Claude Sonnet 5.5](https://openrouter.ai/anthropic/claude-sonnet-5.5) 设为默认模型,高并发和子智能体任务用 [Claude Haiku 5.5](https://openrouter.ai/anthropic/claude-haiku-5.5),任务耗时长、需求模糊或出错代价高时用 [Claude Opus 5.5](https://openrouter.ai/anthropic/claude-opus-5.5)。
对多数团队来说,选择其实是在 Opus 和 Sonnet 之间做,问题在于 Opus 每 token 的价格是 Sonnet 的两倍,值不值。在我们测试的编程任务上,答案是不值。我们给每个模型都安排了同样的 11 个带隐藏测试的编程任务,以及 [Claude Code](https://code.claude.com/docs/en/overview) 里同一个修 bug 任务。所有模型全部通过,所以拉开差距的是成本。按任务算,Haiku 比 Opus 便宜 19 到 30 倍,Sonnet 的成本则是 Opus 的一半到三分之二。
这些结果只说明三款模型在我们任务上的表现。要知道哪款最适合你的工作流,唯一的办法是在你自己的工作上测试。[Ori Eval](https://openrouter.ai/docs/guides/ori/eval) 可以帮你做这件事。你问编程智能体哪个模型最适合你的项目,它就会在你的代码里找测试素材、编写评测、运行你想对比的模型,并给出推荐,同时附上分数、耗时和成本。后面讲模型切换的那一节会说明如何让它指向这三个层级。
## 简要结论
- 把 Claude Sonnet 5.5 作为默认模型。在我们的 GPQA Diamond 和 τ-bench 测试中,它的得分与 Opus 5.5 持平或更高,通过了全部编程测试,而每 token 价格只有一半。
- 高并发和子智能体任务用 Haiku 5.5。它同样通过了全部编程测试,成本只有 Sonnet 的十二分之一到十六分之一。
- 任务耗时长、需求模糊、出错代价高于 token 成本时,保留 Opus 5.5。我们的短任务无法排除它在这类场景下的优势。
- 我们的任务不等于你的任务。选定之前,先用 Ori Eval 在你自己的工作里测试这三款模型。
- 在 OpenRouter 上,三者只差一个模型字符串,Claude Code 还可以为不同角色分别指定不同的模型。
## Opus、Sonnet 和 Haiku 有什么区别?
Opus 5.5、Sonnet 5.5 和 Haiku 5.5 是同一代模型的三个层级。Anthropic 于 2026 年 9 月 22 日发布 [Opus 5.5](https://www.anthropic.com/claude-opus-5-5),9 月 28 日发布 [Sonnet 5.5](https://www.anthropic.com/claude-sonnet-5-5),10 月 7 日发布 [Haiku 5.5](https://www.anthropic.com/claude-haiku-5-5)。三者都有 [100 万 token 上下文窗口](https://platform.claude.com/docs/en/about-claude/models/overview),都接受文本、图片和 PDF。它们的主要差异在价格,另外 Haiku 的基准测试分数更低。
| 模型属性 / 指标 | Opus 5.5 | Sonnet 5.5 | Haiku 5.5 |
| --- | --- | --- | --- |
| 输入,每百万 token | $4.00 | $2.00 | $0.10 |
| 输出,每百万 token | $20.00 | $10.00 | $0.50 |
| 缓存读取,每百万 token | $0.20 | $0.10 | $0.01 |
| Artificial Analysis 智能指数 | 57.6 | 56.0 | 43.4 |
| GPQA Diamond(我们的测试) | 90.4% | 92.4% | 86.6% |
| τ-bench 航空(我们的测试) | 75.5% | 78.7% | 76.0% |
| OpenRouter 上的 token 量,10 月 12 日至 18 日 | 6.18T | 2.45T | 2.07T |
价格是 2026 年 10 月 21 日我们的标价,来自 [Opus 5.5](https://openrouter.ai/anthropic/claude-opus-5.5)、[Sonnet 5.5](https://openrouter.ai/anthropic/claude-sonnet-5.5) 和 [Haiku 5.5](https://openrouter.ai/anthropic/claude-haiku-5.5) 的模型页面。基准测试各行来自我们的 [benchmarks 接口](https://openrouter.ai/docs/api/api-reference/benchmarks/list-benchmarks),数据于 10 月 21 日拉取(我们的测试运行于 10 月 17 日)。[Artificial Analysis 智能指数](https://artificialanalysis.ai/methodology/intelligence-benchmarking)是独立基准测试公司 Artificial Analysis 对 10 项评测给出的综合分数。T 表示万亿 token,数据来自我们的[每日排名数据集](https://openrouter.ai/docs/api/api-reference/datasets/daily-token-totals-for-top-50-models)。
## Opus 比 Sonnet 更好吗?
在我们跑的基准测试里,Claude Opus 5.5 并没有胜过 Claude Sonnet 5.5。在我们跑的 [GPQA Diamond](https://arxiv.org/abs/2311.12022) 上 Sonnet 得分更高,这是一组 198 道研究生水平的科学题(92.4% 对 90.4%)。在 [τ-bench](https://github.com/sierra-research/tau2-bench) airline 上它同样更高,这是一个多轮客服智能体基准(78.7% 对 75.5%)。在 Artificial Analysis 指数上 Opus 领先 1.6 分。在我们两次运行中,Sonnet 每个任务的成本都不到一半:GPQA 每题 $0.025,Opus 是 $0.054;τ-bench 每任务 $0.16,Opus 是 $0.34。
10 月 12 日那一周,Opus 5.5 在 OpenRouter 上的 token 用量约为 Sonnet 的 2.5 倍。Opus 还是 Claude Code 在多数套餐下的[默认模型](https://code.claude.com/docs/en/model-config),在我们的测试中,没有指定模型时 Claude Code 会通过 OpenRouter 使用 Opus 5.5。如果你没改过模型,那你跑的就是 Opus。
## Haiku 够不够格取代 Sonnet?
对于需求明确、常规性的工作,Haiku 5.5 可以取代 Sonnet。它在 τ-bench airline 上得分 76.0%,比 Opus 高半分,比 Sonnet 低 2.7 分,每任务成本 $0.011,约为 Sonnet 的十四分之一。我们每个模型跑了 100 到 200 个任务,所以这个基准上几分之差可能是噪声。在 GPQA Diamond 上 Haiku 落后 Sonnet 5.8 分,在 Artificial Analysis 指数上落后 12.6 分——该指数中智能体任务和通用知识各占 30%,编程和科学推理各占 20%。在常规编程上,我们下面的测试没有发现差距。
## 我们的编程测试说明了什么?
我们测了两件事:按规格写函数,以及用 Claude Code 修一个代码仓库。三个模型在两项测试中都通过了全部测试。
### 带隐藏测试的函数
我们写了 11 个 Python 任务,每个都配一个隐藏测试文件。8 个日常任务是:解析时长、合并区间、LRU 缓存、不用 `eval` 的算术求值器、cron 表达式的下次运行时间、自动换行、[语义化版本](https://semver.org/)排序,以及 JSON 路径读取器。3 个困难任务分别是:不用 `re` 模块的正则引擎、带三值 NULL 逻辑的 SQL WHERE 过滤器,以及夏令时切换日跨时区的空闲日程时段。每个模型对每个日常任务作答两次、每个困难任务作答三次,使用模型默认设置,每个模型共 25 次尝试。
| 指标 | Opus 5.5 | Sonnet 5.5 | Haiku 5.5 |
| --- | --- | --- | --- |
| 通过的尝试 | 25/25 | 25/25 | 25/25 |
| 每个日常任务成本 | $0.0211 | $0.0112 | $0.0007 |
| 每个困难任务成本 | $0.0739 | $0.0380 | $0.0027 |
| 每个困难任务耗时 | 32.1 | 25.7 | 22.6 |
Haiku 用的推理最多,却仍然最快完成困难任务。在困难任务上它平均用了 3,202 个[推理 token](https://openrouter.ai/docs/guides/best-practices/reasoning-tokens),Opus 是 1,252 个。推理 token 是模型在写出答案之前用于推演问题的 token。即便推理更多,Haiku 每个困难任务的成本也只有 Opus 的二十七分之一。
### 在 Claude Code 里修 bug
我们给 Claude Code 一个小型发票库,里面有三个 bug 和五个测试。三个 bug 分别是:用了[银行家舍入](https://docs.python.org/3/library/functions.html#round)(四舍六入五成双)的舍入逻辑、在引号内的逗号处错误分割的 CSV 解析器,以及用覆盖而非累加数量的汇总逻辑。我们通过 OpenRouter 让每个模型跑了三次,用 [`ANTHROPIC_MODEL` 环境变量](https://code.claude.com/docs/en/model-config)选择模型。
| 指标 | Opus 5.5 | Sonnet 5.5 | Haiku 5.5 |
| --- | --- | --- | --- |
| 修复全部三个 bug 的运行次数 | 3/3 | 3/3 | 3/3 |
| 每次会话成本中位数 | $0.098 | $0.062 | $0.0052 |
| 轮次 | 5 | 5 | 6 到 8 |
| 实际耗时 | 24 到 30 秒 | 18 到 25 秒 | 22 到 31 秒 |
一轮指会话中的一次模型响应。我们按自己的价格、根据每个会话的 token 数计算会话成本,因为 Claude Code 自己给出的数字对 Haiku 来说是错的。
Claude Code 自己的[`total_cost_usd` 字段](https://code.claude.com/docs/en/headless)不认识我们的 Haiku slug,报告每个会话 0.16 到 0.31 美元,是我们算出的中位数 0.0052 美元的 30 到 60 倍。在 print 模式(`claude -p`)下,Claude Code 遇到不认识的模型 slug 会记录一条警告。我们通过 Haiku 发一个单词的回复时又看到了它:Claude Code 报告 0.107 美元,而按我们的价格这次请求约花费 0.002 美元。
```
[claude-code:unrecognized_model] {"model":"anthropic/claude-haiku-5.5","query_source":"sdk"}
```
如果你通过 OpenRouter 运行 Claude Code,请改到[活动页面](https://openrouter.ai/activity)查看支出;如果需要设置上限,请使用我们的[支出控制](https://openrouter.ai/blog/insights/governing-team-ai-spend/)。
这些都是规模小、定义明确的任务。在这些任务上,三个档位同样可靠,成本却相差很大。它们并不覆盖 Anthropic 打造 Opus 所针对的工作,也就是[长时间运行的智能体编程与知识工作](https://platform.claude.com/docs/en/about-claude/models/overview),在那类工作中出错的代价比 token 更贵。
## 该用哪一个?
- 如果你想要一个默认选择,就用 Claude Sonnet 5.5。在我们两次基准测试中,它的得分与 Opus 持平或更高,在我们所有测试中也与 Opus 相当,而每 token 价格只有一半。
- 如果你要处理大量请求,比如分类、抽取、子智能体或批量代码修改,就用 Haiku 5.5。它通过了我们给它的每一项测试,成本只有 Sonnet 的 1/12 到 1/16、Opus 的 1/19 到 1/30。把提示词控制在 100,000 token 以内,以保持在[较低价格](https://openrouter.ai/blog/tutorials/how-to-get-the-lowest-cost-llm-inference-on-openrouter/)档。在 Claude Code 之外,我们的[子智能体服务器工具](https://openrouter.ai/docs/guides/features/server-tools/subagent)可以让较大的模型把独立完整的任务交给较小的模型。
- 对于出错代价高昂的长任务,请使用 Opus 5.5。这正是它为之打造的工作,我们的短任务无法排除它在这方面具有优势。
- 如果你分不清自己的工作负载属于哪一类,就按下一节所述,测试你自己的任务,而不是我们的任务。
## 如何在它们之间切换?
我们通过[同一个 API](https://openrouter.ai/docs/quickstart)、同一个密钥和同一种请求格式提供这三个模型,所以切换只需改动模型字符串。下面这个循环把同一个提示词发给每个档位,并打印输出 token 数以及[我们在每次响应中返回的成本](https://openrouter.ai/docs/cookbook/administration/usage-accounting)。
```
import os
import requests
for model in ["anthropic/claude-opus-5.5", "anthropic/claude-sonnet-5.5", "anthropic/claude-haiku-5.5"]:
r = requests.post(
"https://openrouter.ai/api/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['OPENROUTER_API_KEY']}"},
json={"model": model, "messages": [{"role": "user", "content": "Write a Python function that merges overlapping intervals."}]},
timeout=300,
)
usage = r.json()["usage"]
print(f"{model}: {usage['completion_tokens']} output tokens, ${usage['cost']:.4f}")
```
这是我们在 2026 年 10 月 13 日运行得到的输出。
```
anthropic/claude-opus-5.5: 1190 output tokens, $0.0239
anthropic/claude-sonnet-5.5: 876 output tokens, $0.0088
anthropic/claude-haiku-5.5: 852 output tokens, $0.0004
```
用 [Ori Eval](https://openrouter.ai/docs/guides/ori/eval) 把[你自己的任务](https://openrouter.ai/blog/tutorials/building-a-golden-eval-dataset-from-production-traffic/)在每个档位上各跑一遍。Ori Eval 测试是 TypeScript 的 `*.eval.ts` 文件。在同一个文件里把三个 slug 都传给 `setupAgent({ model })`,同样的测试就会在每个档位上运行。
在 Claude Code 中,你可以让 Opus 负责规划,把常规工作交给更便宜的模型。按我们的[设置指南](https://openrouter.ai/docs/cookbook/coding-agents/claude-code-integration)把 Claude Code 指向 OpenRouter,然后为每个角色设置模型。
```
export ANTHROPIC_DEFAULT_OPUS_MODEL="anthropic/claude-opus-5.5"
export ANTHROPIC_DEFAULT_SONNET_MODEL="anthropic/claude-sonnet-5.5"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="anthropic/claude-haiku-5.5"
export CLAUDE_CODE_SUBAGENT_MODEL="anthropic/claude-haiku-5.5"
```
Claude Code 2.1.307 能识别 Opus 和 Sonnet 的 slug,并给它们 100 万 token 的上下文窗口。它还不认识 Haiku 的 slug,会假定为 200,000 token。要让 Haiku 获得完整窗口,请在其 slug 后加上 `[1m]`。我们会在路由前去掉这个后缀。不加后缀则会让 Haiku 会话保持在约 200,000 token 以内。
这些变量决定每个名称指向哪个模型,并不改变你实际使用的是哪一个。要把 Sonnet 设为主模型,可在会话中运行 `/model sonnet`,或在启动 Claude Code 前设置 `ANTHROPIC_MODEL=sonnet`。要用 Opus 规划、用 Sonnet 写代码,请改为运行 [`/model opusplan`](https://code.claude.com/docs/en/model-config)。由于设置了 `CLAUDE_CODE_SUBAGENT_MODEL`,没有指定自己模型的[子智能体](https://code.claude.com/docs/en/sub-agents)会运行在 Haiku 上。
如果你更希望由我们[按请求逐个挑选](https://openrouter.ai/blog/insights/model-routing/),[Auto Router](https://openrouter.ai/docs/guides/routing/routers/auto-router)(`openrouter/auto`)会为每个提示词选择一个模型。用于编程时,[Pareto Router](https://openrouter.ai/docs/guides/routing/routers/pareto-router) 会挑选一个达到你设定的最低编程分数的模型。
## 常见问题
### Claude Haiku 比 Sonnet 便宜吗?
是的。在 OpenRouter 上,对于 10 万 token 以下的提示词,Haiku 5.5 的每输入和输出 token 成本比 Claude Sonnet 5.5 低 20 倍,每百万输入 token 为 0.10 美元,而后者为 2.00 美元。在我们的 Claude Code 运行中,每次会话的差距更小,约为 12 倍,部分原因是 Haiku 需要更多轮次才能达到相同结果。
### 在编程方面,Sonnet 5.5 比 Opus 5.5 更好吗?
在我们的 Claude Sonnet 与 Opus 编程测试中,两者表现相当。两者都通过了全部 25 次隐藏测试尝试,以及通过 OpenRouter 进行的全部三次 Claude Code 运行,而 Sonnet 更快,成本只有后者的二分之一到三分之二。Opus 在 Artificial Analysis 指数上领先 1.6 分,Anthropic 将其定位为[长时间运行的智能体编程](https://platform.claude.com/docs/en/about-claude/models/overview),因此对于漫长且模糊的会话,它是更稳妥的选择。
### Claude Haiku 适合做什么?
Haiku 5.5 适合高吞吐、定义明确的工作,例如[分类、提取、路由](https://platform.claude.com/docs/en/about-claude/models/overview)、子智能体任务和常规代码修改。在我们通过 OpenRouter 进行的测试中,它通过了所有编程任务,包括正则表达式引擎和 SQL 三值 NULL 逻辑,并在 τ-bench 航空任务上比 Opus 高出半分。
### Claude Code 使用哪个 Claude 模型?
根据[Anthropic 的模型配置文档](https://code.claude.com/docs/en/model-config),Claude Code 在 Pro、Max、Team、Enterprise 和 Anthropic API 账户上默认使用 Opus 5.5。当你通过 OpenRouter 运行 Claude Code 时,可以用 `ANTHROPIC_MODEL` 更改主模型,并用上面的环境变量设置每个角色。
## 后续步骤
- [Ori Eval](https://openrouter.ai/docs/guides/ori/eval) 会在你自己的任务上运行 Opus、Sonnet 和 Haiku,并推荐其中一个。要开始,请给你的编程智能体这条指令:`run curl -fsSL https://openrouter.ai/skills/spawn-ori-eval and follow the instructions in its output to get started`。
- 我们的[设置指南](https://openrouter.ai/docs/cookbook/coding-agents/claude-code-integration)涵盖按角色配置模型,教程[Claude Code with OpenRouter:设置、模型与成本](https://openrouter.ai/blog/tutorials/claude-code-openrouter/)涵盖模型选择和成本。
- [Opus 5.5](https://openrouter.ai/anthropic/claude-opus-5.5)、[Sonnet 5.5](https://openrouter.ai/anthropic/claude-sonnet-5.5) 和 [Haiku 5.5](https://openrouter.ai/anthropic/claude-haiku-5.5) 的模型页面显示当前价格、提供商和正常运行时间。我们的[Opus 5.5 vs Sonnet 5.5 对比页面](https://openrouter.ai/compare/anthropic/claude-opus-5.5/anthropic/claude-sonnet-5.5)将其中两者并排比较。
- [提示词缓存](https://openrouter.ai/docs/guides/best-practices/prompt-caching)解释了上表中的缓存读取价格。
- 如果你要从较旧的 Claude 模型迁移,[Claude 5.5 迁移指南](https://openrouter.ai/docs/cookbook/evaluate-and-optimize/model-migrations/claude-5-5)涵盖了 API 变更。
- [智能体模型的成本与质量权衡框架](https://openrouter.ai/blog/insights/cost-vs-quality-tradeoff-framework-for-agent-models/)和[模型升级路由的置信度阈值](https://openrouter.ai/blog/insights/confidence-thresholds-for-model-escalation-routing/)涵盖了何时将请求提升一个层级。
## 正文 · 原文
Use [Claude Sonnet 5.5](https://openrouter.ai/anthropic/claude-sonnet-5.5) as your default, [Claude Haiku 5.5](https://openrouter.ai/anthropic/claude-haiku-5.5) for high-volume and sub-agent work, and [Claude Opus 5.5](https://openrouter.ai/anthropic/claude-opus-5.5) when a task is long, ambiguous, or expensive to get wrong.
For most teams, the choice is between Opus and Sonnet, and the question is whether Opus is worth twice Sonnet’s price per token. On the coding tasks we tested, it wasn’t. We gave each model the same 11 coding tasks with hidden tests and the same bug-fix task in [Claude Code](https://code.claude.com/docs/en/overview). Every model passed everything, so what separated them was cost. Haiku was 19 to 30 times cheaper than Opus per task, and Sonnet cost between half and two-thirds as much as Opus.
Those results tell you how the three did on our tasks. The only way to know which one is best for your workflow is to test them on your own work. [Ori Eval](https://openrouter.ai/docs/guides/ori/eval) does this for you. You ask your coding agent which model is best for your project, and it finds test material in your code, writes the eval, runs the models you want to compare, and recommends one with the scores, times, and costs behind it. The section on switching between them shows how to point it at all three tiers.
## Tl;dr
- Use Claude Sonnet 5.5 as your default. It scored as well as or better than Opus 5.5 on our GPQA Diamond and τ-bench runs and passed every coding test, at half the per-token price.
- Use Haiku 5.5 for high-volume and sub-agent work. It passed every coding test too, at a 12th to a 16th of Sonnet’s cost.
- Keep Opus 5.5 for long, ambiguous tasks where a mistake costs more than the tokens. Our short tasks can’t rule out an advantage there.
- Our tasks aren’t yours. Test the three on your own work with Ori Eval before you settle on one.
- All three are one model string apart on OpenRouter, and Claude Code can use a different one for each role.
## How do Opus, Sonnet, and Haiku differ?
Opus 5.5, Sonnet 5.5, and Haiku 5.5 are three tiers of the same model generation. Anthropic released [Opus 5.5](https://www.anthropic.com/claude-opus-5-5) on September 22, 2026, [Sonnet 5.5](https://www.anthropic.com/claude-sonnet-5-5) on September 28, and [Haiku 5.5](https://www.anthropic.com/claude-haiku-5-5) on October 7. All three have a [1-million-token context window](https://platform.claude.com/docs/en/about-claude/models/overview) and accept text, images, and PDFs. They differ mostly in price and, for Haiku, in lower benchmark scores.
| Model Property / Metric | Opus 5.5 | Sonnet 5.5 | Haiku 5.5 |
| --- | --- | --- | --- |
| Input, per million tokens | $4.00 | $2.00 | $0.10 |
| Output, per million tokens | $20.00 | $10.00 | $0.50 |
| Cache read, per million tokens | $0.20 | $0.10 | $0.01 |
| Artificial Analysis Intelligence Index | 57.6 | 56.0 | 43.4 |
| GPQA Diamond (our run) | 90.4% | 92.4% | 86.6% |
| τ-bench airline (our run) | 75.5% | 78.7% | 76.0% |
| Tokens on OpenRouter, Oct 12 to 18 | 6.18T | 2.45T | 2.07T |
Prices are our list prices on October 21, 2026, from the model pages for [Opus 5.5](https://openrouter.ai/anthropic/claude-opus-5.5), [Sonnet 5.5](https://openrouter.ai/anthropic/claude-sonnet-5.5), and [Haiku 5.5](https://openrouter.ai/anthropic/claude-haiku-5.5). The benchmark rows come from our [benchmarks endpoint](https://openrouter.ai/docs/api/api-reference/benchmarks/list-benchmarks), pulled on October 21 (our runs of October 17). The [Artificial Analysis Intelligence Index](https://artificialanalysis.ai/methodology/intelligence-benchmarking) is a composite score across 10 evaluations from the independent benchmarking firm Artificial Analysis. T means trillions of tokens, from our [daily rankings dataset](https://openrouter.ai/docs/api/api-reference/datasets/daily-token-totals-for-top-50-models).
## Is Opus better than Sonnet?
On the benchmarks we run, Claude Opus 5.5 does not beat Claude Sonnet 5.5. Sonnet scored higher on our run of [GPQA Diamond](https://arxiv.org/abs/2311.12022), a set of 198 graduate-level science questions (92.4% vs 90.4%). It also scored higher on [τ-bench](https://github.com/sierra-research/tau2-bench) airline, a multi-turn customer-service agent benchmark (78.7% vs 75.5%). Opus leads by 1.6 points on the Artificial Analysis index. On both of our runs, Sonnet costs less than half as much per task, at $0.025 per GPQA question against $0.054 and $0.16 per τ-bench task against $0.34.
In the week of October 12, Opus 5.5 carried about two and a half times Sonnet’s token volume on OpenRouter. Opus is also Claude Code’s [default model](https://code.claude.com/docs/en/model-config) on most plans, and in our test Claude Code used Opus 5.5 through OpenRouter when no model was set. If you haven’t changed your model, Opus is what you’re running.
## Is Haiku good enough to replace Sonnet?
Haiku 5.5 can replace Sonnet for well-specified, routine work. It scored 76.0% on τ-bench airline, half a point above Opus and 2.7 points behind Sonnet, at $0.011 per task. That is about a fourteenth of Sonnet’s cost. Our runs had 100 to 200 tasks per model, so gaps of a few points on this benchmark may be noise. Haiku trails Sonnet by 5.8 points on GPQA Diamond and by 12.6 points on the Artificial Analysis index, which weights agentic tasks and general knowledge at 30% each and coding and scientific reasoning at 20% each. On routine coding, our tests below found no gap.
## What did our coding tests show?
We tested two things, writing a function to a spec and fixing a repo with Claude Code. All three models passed every test in both.
### Functions with hidden tests
We wrote 11 Python tasks, each with a hidden test file. The eight everyday tasks were parsing durations, merging intervals, an LRU cache, an arithmetic evaluator without `eval`, the next run time of a cron expression, word wrapping, [Semantic Versioning](https://semver.org/) sort order, and a JSON path reader. The three hard tasks were a regex engine without the `re` module, a SQL WHERE filter with three-valued NULL logic, and free calendar slots across time zones on daylight-saving transition days. Each model answered each everyday task twice and each hard task three times, with the models’ default settings, for 25 attempts per model.
| Metric | Opus 5.5 | Sonnet 5.5 | Haiku 5.5 |
| --- | --- | --- | --- |
| Attempts passed | 25 of 25 | 25 of 25 | 25 of 25 |
| Cost per everyday task | $0.0211 | $0.0112 | $0.0007 |
| Cost per hard task | $0.0739 | $0.0380 | $0.0027 |
| Seconds per hard task | 32.1 | 25.7 | 22.6 |
Haiku used the most reasoning and still finished the hard tasks fastest. On the hard tasks it used 3,202 [reasoning tokens](https://openrouter.ai/docs/guides/best-practices/reasoning-tokens) on average, against 1,252 for Opus. Reasoning tokens are the tokens a model spends working through a problem before it writes its answer. Even with the extra reasoning, Haiku cost a 27th as much as Opus per hard task.
### A bug-fix in Claude Code
We gave Claude Code a small invoicing library with three bugs and five tests. The bugs were rounding that used [banker’s rounding](https://docs.python.org/3/library/functions.html#round) (round half to even), a CSV parser that split on commas inside quotes, and a summary that overwrote quantities instead of adding them. We ran it three times per model through OpenRouter, choosing the model with the [`ANTHROPIC_MODEL` environment variable](https://code.claude.com/docs/en/model-config).
| Metric | Opus 5.5 | Sonnet 5.5 | Haiku 5.5 |
| --- | --- | --- | --- |
| Runs that fixed all three bugs | 3 of 3 | 3 of 3 | 3 of 3 |
| Median cost per session | $0.098 | $0.062 | $0.0052 |
| Turns | 5 | 5 | 6 to 8 |
| Wall-clock time | 24 to 30 s | 18 to 25 s | 22 to 31 s |
A turn is one model response in the session. We computed session cost from each session’s token counts at our prices, because Claude Code’s own figure was wrong for Haiku.
Claude Code’s own [`total_cost_usd` field](https://code.claude.com/docs/en/headless) didn’t recognize our Haiku slug and reported $0.16 to $0.31 per session, 30 to 60 times our computed median of $0.0052. In print mode (`claude -p`), Claude Code logs a warning when it doesn’t recognize a model slug. We saw it again on a one-word reply through Haiku, where Claude Code reported $0.107 and the request cost about $0.002 at our prices.
```
[claude-code:unrecognized_model] {"model":"anthropic/claude-haiku-5.5","query_source":"sdk"}
```
If you run Claude Code through OpenRouter, check spend on your [Activity page](https://openrouter.ai/activity) instead, and use our [spend controls](https://openrouter.ai/blog/insights/governing-team-ai-spend/) if you need a cap.
These are small, well-specified tasks. On these tasks, the three tiers were equally reliable, and their costs differed widely. They don’t cover the work Anthropic built Opus for, which is [long-running agentic coding and knowledge work](https://platform.claude.com/docs/en/about-claude/models/overview) where a mistake costs more than the tokens.
## Which one should you use?
- If you want one default, use Claude Sonnet 5.5. It scored as well as or better than Opus on both of our benchmark runs and matched it on all of our tests, at half the per-token price.
- If you run a lot of requests, such as classification, extraction, sub-agents, or bulk code edits, use Haiku 5.5. It passed every test we gave it at a 12th to a 16th of Sonnet’s cost and a 19th to a 30th of Opus’s. Keep prompts under 100,000 tokens to stay on its [lower price](https://openrouter.ai/blog/tutorials/how-to-get-the-lowest-cost-llm-inference-on-openrouter/). Outside Claude Code, our [Subagent server tool](https://openrouter.ai/docs/guides/features/server-tools/subagent) lets a larger model hand self-contained tasks to a smaller one.
- Use Opus 5.5 for long tasks where a mistake is costly. That is the work it is built for, and our short tasks can’t rule out an advantage there.
- If you can’t tell which group your workload is in, test your own tasks rather than ours, as described in the next section.
## How do you switch between them?
We serve all three models through [one API](https://openrouter.ai/docs/quickstart), one key, and one request format, so switching means changing the model string. This loop sends the same prompt to each tier and prints the output tokens and the [cost we return on every response](https://openrouter.ai/docs/cookbook/administration/usage-accounting).
```
import os
import requests
for model in ["anthropic/claude-opus-5.5", "anthropic/claude-sonnet-5.5", "anthropic/claude-haiku-5.5"]:
r = requests.post(
"https://openrouter.ai/api/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['OPENROUTER_API_KEY']}"},
json={"model": model, "messages": [{"role": "user", "content": "Write a Python function that merges overlapping intervals."}]},
timeout=300,
)
usage = r.json()["usage"]
print(f"{model}: {usage['completion_tokens']} output tokens, ${usage['cost']:.4f}")
```
This is the output from our run on October 13, 2026.
```
anthropic/claude-opus-5.5: 1190 output tokens, $0.0239
anthropic/claude-sonnet-5.5: 876 output tokens, $0.0088
anthropic/claude-haiku-5.5: 852 output tokens, $0.0004
```
Run [your own tasks](https://openrouter.ai/blog/tutorials/building-a-golden-eval-dataset-from-production-traffic/) through each tier with [Ori Eval](https://openrouter.ai/docs/guides/ori/eval). Ori Eval tests are TypeScript `*.eval.ts` files. Pass each of the three slugs to `setupAgent({ model })` in one file, and the same tests run on every tier.
In Claude Code, you can keep Opus for planning and send routine work to cheaper models. Point Claude Code at OpenRouter with our [setup guide](https://openrouter.ai/docs/cookbook/coding-agents/claude-code-integration), then set the model for each role.
```
export ANTHROPIC_DEFAULT_OPUS_MODEL="anthropic/claude-opus-5.5"
export ANTHROPIC_DEFAULT_SONNET_MODEL="anthropic/claude-sonnet-5.5"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="anthropic/claude-haiku-5.5"
export CLAUDE_CODE_SUBAGENT_MODEL="anthropic/claude-haiku-5.5"
```
Claude Code 2.1.307 recognizes the Opus and Sonnet slugs and gives them their 1-million-token context window. It doesn’t recognize the Haiku slug yet and assumes 200,000 tokens. To give Haiku its full window, add `[1m]` to its slug. We strip the suffix before routing. Leaving it off keeps Haiku sessions under about 200,000 tokens.
These variables set which model each name points to. They don’t change which one you use. To make Sonnet your main model, run `/model sonnet` in a session or set `ANTHROPIC_MODEL=sonnet` before you start Claude Code. To plan with Opus and write code with Sonnet, run [`/model opusplan`](https://code.claude.com/docs/en/model-config) instead. Because `CLAUDE_CODE_SUBAGENT_MODEL` is set, [sub-agents](https://code.claude.com/docs/en/sub-agents) that don’t name their own model run on Haiku.
If you’d rather have us [pick per request](https://openrouter.ai/blog/insights/model-routing/), the [Auto Router](https://openrouter.ai/docs/guides/routing/routers/auto-router) (`openrouter/auto`) chooses a model for each prompt. For coding, the [Pareto Router](https://openrouter.ai/docs/guides/routing/routers/pareto-router) picks a model that meets a minimum coding score you set.
## Frequently asked questions
### Is Claude Haiku cheaper than Sonnet?
Yes. On OpenRouter, Haiku 5.5 costs 20 times less per input and output token than Claude Sonnet 5.5 for prompts under 100,000 tokens, at $0.10 per million input tokens against $2.00. In our Claude Code runs the gap per session was smaller, about 12 times, partly because Haiku took more turns to reach the same result.
### Is Sonnet 5.5 better than Opus 5.5 for coding?
In our Claude Sonnet vs Opus coding tests, the two were equal. Both passed all 25 hidden-test attempts and all three Claude Code runs through OpenRouter, and Sonnet was faster and cost half to two-thirds as much. Opus leads by 1.6 points on the Artificial Analysis index, and Anthropic positions it for [long-running agentic coding](https://platform.claude.com/docs/en/about-claude/models/overview), so it’s the safer choice for long, ambiguous sessions.
### What is Claude Haiku good for?
Haiku 5.5 is good for high-volume, well-specified work such as [classification, extraction, routing](https://platform.claude.com/docs/en/about-claude/models/overview), sub-agent tasks, and routine code changes. In our tests through OpenRouter it passed every coding task, including a regex engine and SQL three-valued NULL logic, and scored half a point above Opus on τ-bench airline.
### Which Claude model does Claude Code use?
Claude Code uses Opus 5.5 by default on Pro, Max, Team, Enterprise, and Anthropic API accounts, according to [Anthropic’s model configuration docs](https://code.claude.com/docs/en/model-config). When you run Claude Code through OpenRouter, you can change the main model with `ANTHROPIC_MODEL` and set each role with the environment variables above.
## Next steps
- [Ori Eval](https://openrouter.ai/docs/guides/ori/eval) runs Opus, Sonnet, and Haiku on your own tasks and recommends one. To start, give your coding agent this instruction: `run curl -fsSL https://openrouter.ai/skills/spawn-ori-eval and follow the instructions in its output to get started`.
- Our [setup guide](https://openrouter.ai/docs/cookbook/coding-agents/claude-code-integration) covers per-role model settings, and our tutorial [Claude Code with OpenRouter: Setup, Models, and Costs](https://openrouter.ai/blog/tutorials/claude-code-openrouter/) covers model choice and costs.
- The model pages for [Opus 5.5](https://openrouter.ai/anthropic/claude-opus-5.5), [Sonnet 5.5](https://openrouter.ai/anthropic/claude-sonnet-5.5), and [Haiku 5.5](https://openrouter.ai/anthropic/claude-haiku-5.5) show current prices, providers, and uptime. Our [Opus 5.5 vs Sonnet 5.5 comparison page](https://openrouter.ai/compare/anthropic/claude-opus-5.5/anthropic/claude-sonnet-5.5) puts two of them side by side.
- [Prompt caching](https://openrouter.ai/docs/guides/best-practices/prompt-caching) explains the cache-read prices in the table above.
- The [Claude 5.5 migration guide](https://openrouter.ai/docs/cookbook/evaluate-and-optimize/model-migrations/claude-5-5) covers the API changes if you’re moving from an older Claude model.
- [Cost vs. Quality Tradeoff Framework for Agent Models](https://openrouter.ai/blog/insights/cost-vs-quality-tradeoff-framework-for-agent-models/) and [Confidence Thresholds for Model Escalation Routing](https://openrouter.ai/blog/insights/confidence-thresholds-for-model-escalation-routing/) cover when to move a request up a tier.