将 Claude Sonnet 5.5 设为默认模型,在大规模处理和子代理任务中使用 Claude Haiku 5.5,而在任务较长、模糊不清或出错成本高昂时选用 Claude Opus 5.5。
对于大多数团队而言,选择主要在 Opus 和 Sonnet 之间进行,核心问题在于 Opus 的每令牌价格是否值得比 Sonnet 高出两倍。在我们测试的代码编写任务中,答案是否定的。我们让每个模型处理相同的 11 项代码编写任务(包含隐藏测试)以及 Claude Code 中的同一项错误修复任务。所有模型均全部通过,因此区分它们的关键在于成本。Haiku 每任务的成本比 Opus 低 19 到 30 倍,而 Sonnet 的成本仅为 Opus 的一半到三分之二。
这些结果展示了三个模型在我们任务中的表现。要确定哪个模型最适合您的工作流,唯一的方法是将其应用于您自己的工作进行测试。Ori Eval 可以为您完成这一工作。您只需询问您的代码代理哪个模型最适合您的项目,它便会在您的代码中寻找测试材料,编写评估脚本,运行您希望比较的模型,并基于分数、耗时和成本推荐其中一个。关于在它们之间切换的部分展示了如何将其指向所有三个层级。
简而言之
将 Claude Sonnet 5.5 设为默认模型。在我们的 GPQA Diamond 和 τ-bench 测试中,它的得分与 Opus 5.5 相当或更优,并通过了所有代码测试,且每令牌价格仅为后者的一半。
在大规模处理和子代理任务中使用 Haiku 5.5。它也通过了所有代码测试,成本仅为 Sonnet 的十二分之一到十六分之一。
将 Opus 5.5 保留用于处理那些出错成本高于令牌费用的长任务或模糊任务。我们的短任务无法排除其在这些场景下的优势。
我们的任务并非您的任务。在确定最终选择之前,请使用 Ori Eval 在您自己的工作上测试这三个模型。
在 OpenRouter 上,这三个模型仅相差一个模型字符串标识符,而 Claude Code 可以为每个角色使用不同的模型。
Opus、Sonnet 和 Haiku 有何不同?
通过订阅,您同意接收 OpenRouter 通讯:包括模型使用数据、产品更新和研究报告,每周约一封电子邮件。您可以通过每封电子邮件中的链接随时取消订阅。请参阅我们的隐私政策 。
Opus 5.5、Sonnet 5.5 和 Haiku 5.5 是同一代模型的三个层级。Anthropic 于 2026 年 9 月 22 日发布 Opus 5.5,9 月 28 日发布 Sonnet 5.5,10 月 7 日发布 Haiku 5.5。三者均拥有 100 万令牌的上下文窗口,并接受文本、图像和 PDF。它们的主要区别在于价格,而对于 Haiku 而言,还包括较低的基准测试分数。
模型属性/指标 Opus 5.5 Sonnet 5.5 Haiku 5.5
输入,每百万令牌 $4.00 $2.00 $0.10
输出,每百万令牌 $20.00 $10.00 $0.50
缓存读取,每百万令牌 $0.20 $0.10 $0.01
Artificial Analysis 智能指数 57.6 56.0 43.4
GPQA Diamond(我们的测试) 90.4% 92.4% 86.6%
τ-bench airline(我们的测试) 75.5% 78.7% 76.0%
OpenRouter 上的令牌数,10 月 12 日至 18 日 6.18T 2.45T 2.07T
价格为我们在 2026 年 10 月 21 日从 Opus 5.5 、Sonnet 5.5 和 Haiku 5.5 的模型页面获取的挂牌价。基准测试行来自我们的基准测试端点,于 10 月 21 日抓取(我们于 10 月 17 日的测试结果)。Artificial Analysis 智能指数是来自独立基准测试公司 Artificial Analysis 的 10 项评估的综合得分。T 代表万亿令牌,数据来自我们的每日排名数据集 。
Opus 是否优于 Sonnet?
在我们运行的基准测试中,Claude Opus 5.5 并未胜过 Claude Sonnet 5.5。Sonnet 在我们的 GPQA Diamond 测试中得分更高,这是一组包含 198 道研究生级别科学问题的测试(92.4% 对 90.4%)。它在 τ-bench airline(一个多轮客户服务代理基准测试)中也得分更高(78.7% 对 75.5%)。Opus 在 Artificial Analysis 指数上以 1.6 分领先。在我们的两项测试中,Sonnet 每任务的成本不到 Opus 的一半,GPQA 问题为 $0.025 对 $0.054,τ-bench 任务为 $0.16 对 $0.34。
在10月12日那一周,Opus 5.5在OpenRouter上的token处理量约为Sonnet的2.5倍。Opus也是Claude Code在大多数套餐中的默认模型,而在我们的测试中,当未设置特定模型时,Claude Code通过OpenRouter使用了Opus 5.5。如果你没有更改你的模型设置,那么你正在运行的就是Opus。
Haiku是否足以取代Sonnet?
对于定义明确、常规的工作,Haiku 5.5可以取代Sonnet。在τ-bench airline基准测试中,它取得了76.0%的得分,比Opus高出0.5分,但落后于Sonnet 2.7分,每任务成本为0.011美元。这大约只有Sonnet成本的十四分之一。我们的运行中每个模型处理了100到200个任务,因此在这个基准测试中几分之差的差距可能是噪音。在GPQA Diamond基准上,Haiku落后Sonnet 5.8分;在Artificial Analysis指数上落后12.6分,该指数将智能体任务和通用知识各占30%的权重,编程和科学推理各占20%。在常规编程方面,我们随后的测试未发现差距。
我们的编程测试显示了什么?
我们测试了两件事:根据规范编写函数以及使用Claude Code修复代码库。所有三个模型在这两项测试中都通过了全部测试。
带有隐藏测试的函数
我们编写了11个Python任务,每个任务都包含一个隐藏测试文件。其中八个日常任务是解析持续时间、合并区间、LRU缓存、不含eval的算术求值器、cron表达式的下一次运行时间、单词换行、语义化版本排序顺序以及JSON路径读取器。三个困难任务是:不含re模块的正则表达式引擎、具有三值NULL逻辑的SQL WHERE过滤器,以及在夏令时转换日跨越时区的空闲日历时段。每个模型对每个日常任务回答两次,对每个困难任务回答三次,使用模型的默认设置,每个模型共25次尝试。
指标 Opus 5.5 Sonnet 5.5 Haiku 5.5
通过尝试次数 25 of 25 25 of 25 25 of 25
每个日常任务成本 $0.0211 $0.0112 $0.0007
每个困难任务成本 $0.0739 $0.0380 $0.0027
每个困难任务耗时(秒) 32.1 25.7 22.6
Haiku使用了最多的推理token,但仍最快完成了困难任务。在困难任务中,它平均使用了3,202个推理token,而Opus为1,252个。推理token是模型在写出答案之前用于解决问题的token。即使有额外的推理过程,Haiku每个困难任务的成本也仅为Opus的二十七分之一。
Claude Code中的Bug修复
我们向Claude Code提供了一个包含三个Bug和五个测试的小型发票库。这些Bug包括使用银行家舍入法(四舍六入五成双)的舍入、在引号内逗号处分割的CSV解析器,以及覆盖数量而非累加数量的摘要功能。我们通过OpenRouter对每个模型运行了三次,通过ANTHROPIC_MODEL环境变量选择模型。
指标 Opus 5.5 Sonnet 5.5 Haiku 5.5
修复所有三个Bug的运行次数 3 of 3 3 of 3 3 of 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字段未能识别我们的Haiku标识符(slug),并报告每次会话成本为0.16至0.31美元,是我们计算的0.0052美元中位数的30到60倍。在打印模式(claude -p)下,当Claude Code无法识别模型标识符时,它会记录警告。我们在通过Haiku收到的一条单字回复中也再次看到了这一情况,当时Claude Code报告成本为0.107美元,而按我们的价格计算请求成本约为0.002美元。
[ claude-code:unrecognized_model ] { "model" : "anthropic/claude-haiku-5.5" , "query_source" : "sdk" }
如果你通过OpenRouter运行Claude Code,请查看你的活动页面中的支出情况,如果需要设置上限,请使用我们的支出控制功能。
这些都是小型、定义明确的任务。在这些任务上,三个层级的可靠性相当,但成本差异巨大。它们并不涵盖Anthropic为Opus构建的工作场景,即长期运行的智能体编程和知识工作,其中错误的代价远高于token成本。
您应该使用哪一个?
如果您需要一个默认选项,请使用 Claude Sonnet 5.5。在两次基准测试中,它的得分与 Opus 持平或更优,并在所有测试中与 Opus 表现相当,而每 token 的价格仅为后者的一半。
如果您运行大量请求,例如分类、提取、子代理或批量代码编辑,请使用 Haiku 5.5。它在每次测试中都顺利通过,成本仅为 Sonnet 的十二分之一到十六分之一,以及 Opus 的十九分之一到三十分之一。请将提示词保持在 100,000 token 以内,以享受其更低的价格。在 Claude Code 之外,我们的 Subagent 服务器工具可以让较大的模型将自包含的任务分配给较小的模型。
对于容错成本高昂的长任务,请使用 Opus 5.5。这正是它被设计用于的工作领域,而我们在短任务中的测试无法排除其在该领域的优势。
如果您无法判断您的工作负载属于哪一组,请按照下一节所述,测试您自己的任务,而不是我们的任务。
如何在它们之间切换?
我们通过一个 API、一个密钥和一个请求格式提供所有三种模型,因此切换只需更改模型字符串即可。此循环将相同的提示词发送给每个层级,并打印输出 token 以及我们在每次响应中返回的成本。
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 在每个层级运行您自己的任务。Ori Eval 测试是 TypeScript *.eval.ts 文件。在单个文件中将这三个 slug 传递给 setupAgent({ model }),相同的测试将在每个层级上运行。
在 Claude Code 中,您可以保留 Opus 用于规划,并将常规工作发送给更便宜的模型。使用我们的设置指南将 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。由于设置了 CLAUDE_CODE_SUBAGENT_MODEL,未指定自身模型的子代理将在 Haiku 上运行。
如果您更愿意让我们为每个请求选择模型,Auto Router ( openrouter/auto ) 会为每个提示词选择一个模型。对于编码,Pareto Router 会选择满足您设定的最低编码分数的模型。
常见问题
Claude Haiku 比 Sonnet 便宜吗?
是的。在 OpenRouter 上,对于低于 100,000 token 的提示词,Haiku 5.5 每输入和输出 token 的成本比 Claude Sonnet 5.5 低 20 倍,即每百万个输入 token 为 $0.10,而 Sonnet 为 $2.00。在我们的 Claude Code 运行中,每次会话的差距较小,约为 12 倍,部分原因是 Haiku 需要更多的轮次才能达到相同的结果。
Sonnet 5.5 在编码方面比 Opus 5.5 更好吗?
在我们的 Claude Sonnet 与 Opus 编码测试中,两者的表现不相上下。两者均成功通过了全部 25 次隐藏测试尝试以及通过 OpenRouter 进行的三次 Claude Code 运行,且 Sonnet 速度更快,成本仅为 Opus 的一半到三分之二。Opus 在 Artificial Analysis 指数上以 1.6 分的优势领先,Anthropic 将其定位为用于长期运行的智能体编码任务,因此对于漫长且模糊的会话而言,它是更稳妥的选择。
Claude Haiku 适合做什么?
Haiku 5.5 适用于高容量、定义明确的工作,例如分类、提取、路由、子代理任务以及常规代码更改。在通过 OpenRouter 进行的测试中,它通过了所有编码任务,包括正则表达式引擎和 SQL 三值 NULL 逻辑,并在 τ-bench 航空公司的测试中得分比 Opus 高出半分。
Claude Code 使用哪个 Claude 模型?
根据 Anthropic 的模型配置文档,Claude Code 在 Pro、Max、Team、Enterprise 以及 Anthropic API 账户上默认使用 Opus 5.5。当你通过 OpenRouter 运行 Claude Code 时,可以通过 ANTHROPIC_MODEL 更改主模型,并使用上述环境变量设置每个角色。
后续步骤
Ori Eval 会在你自己的任务上运行 Opus、Sonnet 和 Haiku,并推荐其中一个。要开始使用,请给你的编码代理以下指令:运行 curl -fsSL https://openrouter.ai/skills/spawn-ori-eval 并按照其输出中的说明开始操作。
我们的设置指南涵盖了按角色划分的模型设置,而我们的教程《通过 OpenRouter 使用 Claude Code:设置、模型和成本》则介绍了模型选择和成本。
Opus 5.5、Sonnet 5.5 和 Haiku 5.5 的模型页面显示了当前价格、提供商和正常运行时间。我们的 Opus 5.5 与 Sonnet 5.5 对比页面将这两款模型并列展示。
提示缓存解释了上表中的缓存读取价格。
如果你正从较旧的 Claude 模型迁移,Claude 5.5 迁移指南涵盖了 API 变更。
《智能体模型的性价比权衡框架》和《用于模型升级路由的置信度阈值》涵盖了何时将请求提升至更高层级的情况。
Use Claude Sonnet 5.5 as your default, Claude Haiku 5.5 for high-volume and sub-agent work, and 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 . 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 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?
By subscribing you agree to receive the OpenRouter newsletter: model usage data, product updates, and research reports, about one email a week. Unsubscribe anytime via the link in every email. See our Privacy Policy .
Opus 5.5, Sonnet 5.5, and Haiku 5.5 are three tiers of the same model generation. Anthropic released Opus 5.5 on September 22, 2026, Sonnet 5.5 on September 28, and Haiku 5.5 on October 7. All three have a 1-million-token context window 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 , Sonnet 5.5 , and Haiku 5.5 . The benchmark rows come from our benchmarks endpoint , pulled on October 21 (our runs of October 17). The Artificial Analysis Intelligence Index is a composite score across 10 evaluations from the independent benchmarking firm Artificial Analysis. T means trillions of tokens, from our daily rankings dataset .
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 , a set of 198 graduate-level science questions (92.4% vs 90.4%). It also scored higher on τ-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 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 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 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 (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 .
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 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 instead, and use our spend controls 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 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 . Outside Claude Code, our Subagent server tool 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 , 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 .
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 through each tier with 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 , 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 instead. Because CLAUDE_CODE_SUBAGENT_MODEL is set, sub-agents that don’t name their own model run on Haiku.
If you’d rather have us pick per request , the Auto Router ( openrouter/auto ) chooses a model for each prompt. For coding, the 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 , 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 , 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 . 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 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 covers per-role model settings, and our tutorial Claude Code with OpenRouter: Setup, Models, and Costs covers model choice and costs.
The model pages for Opus 5.5 , Sonnet 5.5 , and Haiku 5.5 show current prices, providers, and uptime. Our Opus 5.5 vs Sonnet 5.5 comparison page puts two of them side by side.
Prompt caching explains the cache-read prices in the table above.
The Claude 5.5 migration guide covers the API changes if you’re moving from an older Claude model.
Cost vs. Quality Tradeoff Framework for Agent Models and Confidence Thresholds for Model Escalation Routing cover when to move a request up a tier.
| 刊期 | 得分 | 排名 | 结果 |
|---|---|---|---|
| 2026-11-10 | 8.4 | 36 | 未入选 |
| 2026-11-09 | 8.4 | 20 | 未入选 |
| 2026-11-08 | 8.4 | 28 | 未入选 |
| 2026-10-31 | 9.95 | 28 | 入选 |