docs(models): pin official registry sources and current discovery gaps
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
* text=auto eol=lf
|
||||
# Official fixture captures keep their original bytes and vendor formatting.
|
||||
tests/fixtures/official-model-registry/sources/** -text -whitespace
|
||||
docs/embedded-browser-development-evidence/** -text whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol
|
||||
docs/embedded-browser-release-evidence/** -text whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol
|
||||
docs/embedded-browser-rejected-candidate-evidence/** -text whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# M2 第三批:官方模型能力注册表
|
||||
|
||||
2026-11-07;基线 `3278c1851a650e320352698bd0ff4fa0ce8cac11`,工作树干净、既有 GitAtlas 分支逐 SHA 一致。承接 I10 用量和 I13 完整账本,推进 I15 与 I28 的注册表来源部分;I09/I11/I12/I14 请求版本/缓存状态与 I27 CI 仍独立验收。
|
||||
|
||||
1. [complete] 17份官方来源/813289字节及双方SHA固定于[来源清单](../tests/fixtures/official-model-registry/SOURCE.json),完整捕获留自有QA根。6旧源码/4配置和目录基线显示nextPageToken与原字段遗漏;精确协议/型号/版本/条件已核对。首次夹具脚本把M1清单路径误当basename,原失败保持,第二独立脚本按实际路径验封通过。官方Anthropic示例使用2026-10-21,与当前固定2023-06-01的有效性不能混称已验证,I14另核对实际请求版本。
|
||||
2. [in_progress] 建立可版本化、可校验与可更新的纯注册表;保留精确 ID、逐字段来源/冲突/有效范围、容量/推理/工具/媒体/缓存/结构化/弃用事实。替代重复的精确 Claude 表,不从型号子串或显示品牌猜能力;手选透传不变。
|
||||
3. [pending] 上游目录保留完整原始声明、正确分页并在选择/刷新时保持原凭据、用户字段与旧 Run;新连接取得官方后备元数据。现有模型中心/参数面板展示来源与冲突,提供显式兼容覆盖并持久保存。
|
||||
4. [pending] 固定官方来源/条件矩阵、多页/未知/退役/冲突/旧配置/参数/真实本机 wire 和恢复;独立冻结构建与网页/实际 Electron 宽窄屏核心路径,检查源码/编译/原件身份。首失败完整保留,不为通过降低检查。
|
||||
5. [pending] 回顾、限定本地提交与既有 GitAtlas 普通增量推送,更新准确接续。下一缓存块/状态/指纹/请求版本与 CI,再 M3 统一发行。
|
||||
|
||||
官方已确认的差异包括 GPT-6.1 Sol/Terra 工具要求 Responses、GPT-6 Sol/Luna 在 Chat 中要求 reasoning_effort=none。它们属于有来源的型号/协议条件,不代表代理拒发、真实模型通过或本地额度。兼容线路可显式声明差异,保留双方来源和实际错误。
|
||||
|
||||
本批不委派、不读真实 Key、不请求真实模型、不改正式数据/配置、不发行/安装/重启、不续旧实验或用户工程。默认 unrestricted/passthrough/preserve 和持久 ask/auto/full 不变;原账本/工件/SHA/unknown 保持。I13 的 schema2 安装增量和激活后回退仍由 M3 实际验证,不能简单放行新表或删旧守卫。历史 W/AD/AE/AG 网络、unknown、真实缓存/重复读/Purge收益unknown全部保留。
|
||||
@@ -1,5 +1,9 @@
|
||||
# 汇总发现
|
||||
|
||||
M2 I15来源/基线已验:17份官方来源813289字节、6旧源码/4配置固定。DeepSeek当前Models API给出1048576上下文/393216最大输出、effort.supported_levels/default_level和api_capabilities;Messages max_tokens在其HTTP层可选、thinking预算被忽略,不能套Anthropic必填语义。Anthropic新版官方例用2026-10-21,现固定2023-06-01的有效性另由I14核对。首夹具把M1清单完整路径误当basename,原脚本/工具错误记录保留,第二按实际路径核SHA通过;无产品或旧证据写入。
|
||||
|
||||
M2 I15起点:当前仅有四Claude精确容量/推理表,其他参数仍从DeepSeek品牌/型号正则猜配置档;目录丢失原字段且不认识nextPageToken。官方OpenAI当前页面明确Sol/Terra工具要求Responses、Sol/Luna旧代Chat工具需reasoning_effort=none,不能用一份通用tools支持代替。将保留官方条件/逐字段来源、代理差异、用户覆盖与实际验证;未知不猜。本次数次过长读输出和猜错客户端路径已纠正为文件列表/明确字段,未当产品验证。
|
||||
|
||||
M2 I13:1107旧记录开放实际全存但只显100,有限只存1000、文案错误。源码da2e6313改为schema2增量表、原metadata原字节/初始记录保留、当前尝试独立更新、完整seq游标/筛选/快照NDJSON。HTTP真实导出只等drain停滞改等实际写回调;首JSON undefined夹具、HTTP超时/中断、桌面初始导航、candidate-4复制失误和网页历史筛选修复均保留。最终build-4独立39/39、candidate-app-5两端各5组/7图/23页/1本机请求,830输入/285产品源码/29编译、4328原件、16源码Git blob核对通过;相关102/102在最后公开数据库版本修正前。M3需明确迁移增量及新处理器回退,不删新记录/回写旧metadata或直接去掉逐表全等守卫;仅同步接续失败的未变初始化撤销已验。真实供应商/缓存/重复读/Purge收益unknown。
|
||||
|
||||
M2首批I10源码cb60fb11完成缓存读/写/未缓存/推理及TTL来源、unknown/冲突保留和失败上下文用量;透传证据核验允许必填/显式输出字段,原SHA/归属/冻结预算不变。最终相关93/93、独立23/23、网页与实际Electron各5组/6图/1280及390通过,822输入/29编译一致;2948原件1018919970字节见[验收](docs/QA-M2-CACHE-USAGE.md)与[机器记录](docs/m2-cache-usage-2026-11-07.json)(docs内使用同级文件名)。首12/15及网页/桌面验收器失败保持。0真实模型/Key/正式写入,不委派/安装/重启或续旧工程,未作新正式health声明。下一I13完整账本/逐请求存储,再M2官方注册表/原生缓存块/状态/指纹/版本与CI、M3统一发行;手机性能/宿主原因/物理手机及历史真实异常、重复读/Purge收益unknown保持。正在验收文档提交与既有GitAtlas普通增量推送,下方按原时点理解。
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# 统一执行进度
|
||||
|
||||
M2 I15阶段1完成:官方17份813289字节和6旧源码/4配置观察已封于自有根,来源fixture含精确URL、捕获/原源SHA、时间和表示范围。下一纯注册表实现与相关确定性验证;本阶段没有产品/正式改动,公开文档请求不是模型调用。首夹具路径表示错误原件保留。
|
||||
|
||||
M2 I15开始:3278c185工作树干净且远端一致,官方文档工具先搜索并取得Models与五精确GPT6当前页面,原文本已保存到自有证据根。先补官方注册表与来源/条件,再目录/现有UI及独立候选;尚无本批产品改动/模型请求/正式操作,不委派。
|
||||
|
||||
M2 I13普通增量推送完成:da2e6313/a2c6e6f5已在既有GitAtlas分支、ls-remote逐SHA一致,回执docs/gitatlas-m2-request-ledger-push.json随最后接续提交再复核。原封存根不追加,下一I15;正式/历史unknown不变。
|
||||
|
||||
M2 I13源码da2e6313与独立候选验收完成:相关第4轮102/102在最后公开版本修正前,最后build-4独立39/39;candidate-app-5网页与实际Electron各5组/7图/23页/1本机请求、1107→1108全量下载/当前和初始SHA/重启保持。830输入/285产品源码/29编译及4328份1620432307字节原件、12原字节/4仅LF归一源码Git blob只读复核通过,原失败保持。验收文档和授权GitAtlas普通增量推送收尾中,下一I15/缓存块状态版本/CI;正式未部署/重启或新health复查,M3安装增量与新处理器回退及历史unknown保持。
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Agent Workbench:核心代理能力研究与产品计划
|
||||
|
||||
当前M2第三批I15:从3278c185干净/远端一致基线开始,见[官方注册表计划](docs/M2-OFFICIAL-REGISTRY-PLAN.md)。已取得OpenAI当前模型官方页面,先固定精确型号/协议/版本/条件和逐字段来源,再接目录与现有参数界面;不触正式/真实Key/模型,不委派,不重启。历史异常和M3安装回退待办保持。
|
||||
|
||||
当前M2第二批I13:[计划](docs/M2-REQUEST-LEDGER-PLAN.md)阶段1–5完成,源码da2e6313/验收a2c6e6f5已普通增量推送并逐SHA一致,[回执](docs/gitatlas-m2-request-ledger-push.json)另随最后接续提交复核。最终build-4独立39/39、candidate-app-5网页与实际Electron各5组/7图/23页通过,830输入/285产品源码/29编译及4328原件/16源码Git blob核对;相关102/102在最后公开版本修正前。下一I15及I09/I11/I12/I14、CI,再M3明确schema2安装/回退。正式未部署/重启或新health复查,默认透传/持久权限和历史unknown保持。
|
||||
|
||||
M2首批I10:源码cb60fb11/相关93/独立23/网页与实际Electron各5组已完成,2948原件SHA封存;验收文档提交与授权GitAtlas增量推送收尾。下一I13完整请求账本/逐请求存储,再M2其余和M3,正式未部署/重启,真实收益unknown。
|
||||
|
||||
+194
@@ -0,0 +1,194 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"registryVersion": "2026-11-07.1",
|
||||
"sources": [
|
||||
{
|
||||
"id": "claude-models__overview",
|
||||
"provider": "anthropic",
|
||||
"url": "https://platform.claude.com/docs/en/models/overview",
|
||||
"checkedAt": "2026-11-06",
|
||||
"sha256": "58a0bd14d9badfe29071397995bc87c1ced653a8b0acde20d34d85e3a9df5562",
|
||||
"file": "sources/claude-models-overview.md",
|
||||
"originalSha256": "04ced1978ad32f6015dfd82c4b4a89812f673411d4d0bd10aedb2957431d9907",
|
||||
"representation": "extracted-official-markdown",
|
||||
"scope": "complete-target-article-excerpt"
|
||||
},
|
||||
{
|
||||
"id": "claude-build-with-claude__thinking",
|
||||
"provider": "anthropic",
|
||||
"url": "https://platform.claude.com/docs/en/build-with-claude/thinking",
|
||||
"checkedAt": "2026-11-06",
|
||||
"sha256": "ff24b4c309610835c57611e4f5b6f8870b27950a8d4548bfae680c9eec1dfb42",
|
||||
"file": "sources/claude-build-with-claude-thinking.md",
|
||||
"originalSha256": "ff24b4c309610835c57611e4f5b6f8870b27950a8d4548bfae680c9eec1dfb42",
|
||||
"representation": "extracted-official-markdown",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "claude-build-with-claude__thinking-steering-and-cost",
|
||||
"provider": "anthropic",
|
||||
"url": "https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost",
|
||||
"checkedAt": "2026-11-06",
|
||||
"sha256": "28b1226b41557efa8d43e3eb28aa038c70b96866939bf1e7cbfd976d82482854",
|
||||
"file": "sources/claude-build-with-claude-thinking-steering-and-cost.md",
|
||||
"originalSha256": "28b1226b41557efa8d43e3eb28aa038c70b96866939bf1e7cbfd976d82482854",
|
||||
"representation": "extracted-official-markdown",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "claude-build-with-claude__prompt-caching",
|
||||
"provider": "anthropic",
|
||||
"url": "https://platform.claude.com/docs/en/build-with-claude/prompt-caching",
|
||||
"checkedAt": "2026-11-06",
|
||||
"sha256": "ff35232788f3f7fbd0f9aae002351567a9ea8e68e5b749069d96dab52882747d",
|
||||
"file": "sources/claude-build-with-claude-prompt-caching.md",
|
||||
"originalSha256": "ff35232788f3f7fbd0f9aae002351567a9ea8e68e5b749069d96dab52882747d",
|
||||
"representation": "extracted-official-markdown",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "deepseek-create",
|
||||
"provider": "deepseek",
|
||||
"url": "https://api-docs.deepseek.com/api/create-chat-completion",
|
||||
"checkedAt": "2026-11-06",
|
||||
"sha256": "b43ca950bd04ae7f6f537b42e6cb729f543d942dcd848ec43ad4e9bfe059fe1f",
|
||||
"file": "sources/deepseek-create.body",
|
||||
"originalSha256": "b43ca950bd04ae7f6f537b42e6cb729f543d942dcd848ec43ad4e9bfe059fe1f",
|
||||
"representation": "received-html-bytes",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "deepseek-thinking",
|
||||
"provider": "deepseek",
|
||||
"url": "https://api-docs.deepseek.com/guides/thinking_mode",
|
||||
"checkedAt": "2026-11-06",
|
||||
"sha256": "42151b5f86827bff663a61693080a61cdbf99074dee94af756c9fce855baa7cd",
|
||||
"file": "sources/deepseek-thinking.body",
|
||||
"originalSha256": "42151b5f86827bff663a61693080a61cdbf99074dee94af756c9fce855baa7cd",
|
||||
"representation": "received-html-bytes",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "deepseek-cache",
|
||||
"provider": "deepseek",
|
||||
"url": "https://api-docs.deepseek.com/guides/kv_cache",
|
||||
"checkedAt": "2026-11-06",
|
||||
"sha256": "061c0c7055ceb96d0a522ae1829ff5f7126ff08f26af217643e371abb740a081",
|
||||
"file": "sources/deepseek-cache.body",
|
||||
"originalSha256": "061c0c7055ceb96d0a522ae1829ff5f7126ff08f26af217643e371abb740a081",
|
||||
"representation": "received-html-bytes",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "openai-gpt-6.1-sol",
|
||||
"provider": "openai",
|
||||
"url": "https://developers.openai.com/api/docs/models/gpt-6.1-sol",
|
||||
"checkedAt": "2026-11-07",
|
||||
"sha256": "a128083565678e6a47a74a737a891a7df050309df19925db6902535fcb1f5f23",
|
||||
"file": "sources/openai-gpt-6.1-sol.md",
|
||||
"originalSha256": "a128083565678e6a47a74a737a891a7df050309df19925db6902535fcb1f5f23",
|
||||
"representation": "official-documentation-tool-text",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "openai-gpt-6-astra",
|
||||
"provider": "openai",
|
||||
"url": "https://developers.openai.com/api/docs/models/gpt-6-astra",
|
||||
"checkedAt": "2026-11-07",
|
||||
"sha256": "7f2f28cf1a8dfdf2557eb1a51f1540e41396397795fe6c39f1f419c922d896ca",
|
||||
"file": "sources/openai-gpt-6-astra.md",
|
||||
"originalSha256": "7f2f28cf1a8dfdf2557eb1a51f1540e41396397795fe6c39f1f419c922d896ca",
|
||||
"representation": "official-documentation-tool-text",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "openai-gpt-6-sol",
|
||||
"provider": "openai",
|
||||
"url": "https://developers.openai.com/api/docs/models/gpt-6-sol",
|
||||
"checkedAt": "2026-11-07",
|
||||
"sha256": "cae6df84b71d6ce278072a5e565db585ad8f946fd5a92492a9fdfa23eaca4e7f",
|
||||
"file": "sources/openai-gpt-6-sol.md",
|
||||
"originalSha256": "cae6df84b71d6ce278072a5e565db585ad8f946fd5a92492a9fdfa23eaca4e7f",
|
||||
"representation": "official-documentation-tool-text",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "openai-gpt-6-luna",
|
||||
"provider": "openai",
|
||||
"url": "https://developers.openai.com/api/docs/models/gpt-6-luna",
|
||||
"checkedAt": "2026-11-07",
|
||||
"sha256": "be1678c26b17547a9b004286dd18065c9e08dfcaf53cb9e80517284fd1cba76e",
|
||||
"file": "sources/openai-gpt-6-luna.md",
|
||||
"originalSha256": "be1678c26b17547a9b004286dd18065c9e08dfcaf53cb9e80517284fd1cba76e",
|
||||
"representation": "official-documentation-tool-text",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "openai-gpt-6.1-terra",
|
||||
"provider": "openai",
|
||||
"url": "https://developers.openai.com/api/docs/models/gpt-6.1-terra",
|
||||
"checkedAt": "2026-11-07",
|
||||
"sha256": "bab1c30e8d49d9be5e7ad0edf90508fb06fffb908123b97c4779f933e8b4bd2a",
|
||||
"file": "sources/openai-gpt-6.1-terra.md",
|
||||
"originalSha256": "bab1c30e8d49d9be5e7ad0edf90508fb06fffb908123b97c4779f933e8b4bd2a",
|
||||
"representation": "official-documentation-tool-text",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "deepseek-model-list",
|
||||
"provider": "deepseek",
|
||||
"url": "https://api-docs.deepseek.com/api/list-models",
|
||||
"checkedAt": "2026-11-07",
|
||||
"sha256": "5c8a4e4fe7256742a2d11218e6b155bb7210524a048cd0a14e733bee90194723",
|
||||
"file": "sources/deepseek-model-list.html",
|
||||
"originalSha256": "5c8a4e4fe7256742a2d11218e6b155bb7210524a048cd0a14e733bee90194723",
|
||||
"representation": "received-html-bytes",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "deepseek-models",
|
||||
"provider": "deepseek",
|
||||
"url": "https://api-docs.deepseek.com/quick_start/pricing",
|
||||
"checkedAt": "2026-11-07",
|
||||
"sha256": "af6679690eb9a7838c47727bfc5ffdc4ac91c4445a0c1219741ffe00c076ece5",
|
||||
"file": "sources/deepseek-models.html",
|
||||
"originalSha256": "af6679690eb9a7838c47727bfc5ffdc4ac91c4445a0c1219741ffe00c076ece5",
|
||||
"representation": "received-html-bytes",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "deepseek-response",
|
||||
"provider": "deepseek",
|
||||
"url": "https://api-docs.deepseek.com/api/create-response.md",
|
||||
"checkedAt": "2026-11-07",
|
||||
"sha256": "5e56e45d25db47f2b6966bbb0b2471d324035c33f0c8f81eaaf8fc444e6869da",
|
||||
"file": "sources/deepseek-response.md",
|
||||
"originalSha256": "5e56e45d25db47f2b6966bbb0b2471d324035c33f0c8f81eaaf8fc444e6869da",
|
||||
"representation": "received-document-bytes",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "deepseek-message",
|
||||
"provider": "deepseek",
|
||||
"url": "https://api-docs.deepseek.com/api/create-message.md",
|
||||
"checkedAt": "2026-11-07",
|
||||
"sha256": "46b31d10f429910bf93ea2166537fb803cd2f49f7c5b4ad2ee4f08257b2e17e8",
|
||||
"file": "sources/deepseek-message.md",
|
||||
"originalSha256": "46b31d10f429910bf93ea2166537fb803cd2f49f7c5b4ad2ee4f08257b2e17e8",
|
||||
"representation": "received-document-bytes",
|
||||
"scope": "complete-captured-source"
|
||||
},
|
||||
{
|
||||
"id": "claude-effort",
|
||||
"provider": "anthropic",
|
||||
"url": "https://platform.claude.com/docs/en/build-with-claude/effort",
|
||||
"checkedAt": "2026-11-06",
|
||||
"sha256": "b19219d51d1ced67deb1451b8a0e243b13925d6e49454f0165d45e06a739704d",
|
||||
"file": "sources/claude-effort.md",
|
||||
"originalSha256": "b19219d51d1ced67deb1451b8a0e243b13925d6e49454f0165d45e06a739704d",
|
||||
"representation": "extracted-official-markdown",
|
||||
"scope": "complete-captured-source"
|
||||
}
|
||||
],
|
||||
"note": "Pinned official declarations and contract examples; not live-provider evidence. Original whole captures and first failures remain in the owned QA roots."
|
||||
}
|
||||
+3384
File diff suppressed because it is too large
Load Diff
+922
@@ -0,0 +1,922 @@
|
||||
---
|
||||
title: Steering thinking
|
||||
url: https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost
|
||||
description: Steer how often and how deeply Claude thinks with effort levels, system prompt guidance, and per-message steering, and understand thinking's cost and pricing.
|
||||
---
|
||||
|
||||
<Note>
|
||||
To learn how zero data retention (ZDR) applies to this feature, see [API and data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention).
|
||||
</Note>
|
||||
|
||||
Claude’s thinking is adaptive: the model evaluates each request and determines whether to think and how much. You set an intent, optionally specify the effort, and the model allocates reasoning where reasoning is likely to help.
|
||||
|
||||
This makes thinking a strong fit for workloads that mix trivial and complex requests, and for long-horizon agentic workflows where the right amount of reasoning varies from step to step.
|
||||
|
||||
To learn how to turn thinking on and how to read thinking output, see the [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) overview. This page covers how Claude determines when to think, how to steer thinking, and the caching, cost, and pricing mechanics that follow from it.
|
||||
|
||||
## How Claude determines when to think
|
||||
|
||||
Thinking is optional for the model. On each request, Claude evaluates the complexity of the input and determines whether deeper reasoning would improve the answer. A simple factual question might get a direct response with no thinking block at all; a multistep math problem or a tricky debugging task triggers deeper reasoning.
|
||||
|
||||
This determination occurs for each request. The same conversation can contain turns with and without thinking, and a turn where Claude skips thinking contains no thinking block. Don’t build application logic that assumes every assistant turn starts with one.
|
||||
|
||||
The primary control over this determination is the [effort](https://platform.claude.com/docs/en/build-with-claude/effort) parameter, which acts as soft guidance for how often and how deeply Claude uses thinking; see [Effort levels](https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost#effort-levels) on this page for what each level does.
|
||||
|
||||
If you want Claude to think less often, lower the effort level before reaching for prompt-based steering.
|
||||
|
||||
Thinking also interleaves with tool use automatically: Claude can think between tool calls, evaluating each tool result before determining what to do next ([interleaved thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#interleaved-thinking)). You don’t need a beta header or any additional configuration for this.
|
||||
|
||||
For full details on how the thinking configuration and the effort parameter interact, see [Thinking and effort](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-effort).
|
||||
|
||||
## Steering how often Claude thinks
|
||||
|
||||
Whether Claude thinks on a given turn is promptable. Effort sets the overall posture, but you can also shape that behavior directly with natural-language guidance, either globally in the system prompt or for individual messages in the user turn.
|
||||
|
||||
Use the two levers together in this order:
|
||||
|
||||
1. Set the effort level that matches your workload’s default balance of quality and latency.
|
||||
2. Add prompt guidance only if Claude’s triggering still doesn’t match your needs at that level.
|
||||
|
||||
<Note>
|
||||
To get less thinking on Claude Sonnet 5.5 and Claude Haiku 5.5, lower the effort level. Asking Claude Sonnet 5.5 in the system prompt to think less doesn’t reliably reduce its thinking, and in Anthropic’s testing, telling Claude Haiku 5.5 in the prompt to answer directly didn’t stop it from thinking. See [Prompting Claude Sonnet 5.5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5#calibrate-effort) and [Prompting Claude Haiku 5.5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5#use-effort-to-control-thinking).
|
||||
</Note>
|
||||
|
||||
For broader prompting guidance with thinking, see [leverage thinking and interleaved thinking capabilities](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#leverage-thinking-and-interleaved-thinking-capabilities).
|
||||
|
||||
### Effort levels
|
||||
|
||||
Effort is the primary steering lever for thinking. Each level sets a different default for how often Claude thinks and how deeply:
|
||||
|
||||
| Effort level | Thinking behavior |
|
||||
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
||||
| `max` | Claude thinks the most readily and at the greatest depth, with no constraint on thinking length. |
|
||||
| `xhigh` | Claude thinks more readily and at greater depth than at `high`, suited to extended exploration. |
|
||||
| `high` (default on most models) | Claude thinks on most requests that benefit from it. Provides deep reasoning on complex tasks. |
|
||||
| `medium` (default on Claude Opus 5.5 and Claude Haiku 5.5) | Claude uses moderate thinking. Might skip thinking for simple queries. |
|
||||
| `low` | Claude minimizes thinking. Skips thinking for simple tasks where speed matters most. |
|
||||
|
||||
At every level, Claude determines for each request whether to think. In a tool-use loop, the first request after new user input typically carries most of the reasoning, and follow-up requests that only process tool results can skip thinking, including at `xhigh` and `max`. Thinking per request also tends to decrease as a conversation grows longer. No level guarantees a thinking block on every request.
|
||||
|
||||
This table describes how each level changes thinking behavior. For guidance on which level to choose for a given workload, including per-model recommendations, see [When to adjust the effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort#when-to-adjust-the-effort-parameter) on the effort page.
|
||||
|
||||
Effort is set at `output_config.effort`, not inside the `thinking` object; for full per-language examples, see [Set the effort level](https://platform.claude.com/docs/en/build-with-claude/effort#basic-usage).
|
||||
|
||||
```json
|
||||
{
|
||||
"model": "claude-opus-5-5",
|
||||
"max_tokens": 4096,
|
||||
"output_config": { "effort": "medium" },
|
||||
"messages": [{ "role": "user", "content": "..." }]
|
||||
}
|
||||
```
|
||||
|
||||
Level availability varies by model; the [effort availability table](https://platform.claude.com/docs/en/build-with-claude/effort#effort-levels) on the effort page is the authority for which levels each model supports.
|
||||
|
||||
### System prompt guidance
|
||||
|
||||
System prompt guidance shifts Claude’s thinking threshold for every request in the conversation. If Claude is thinking more often than your workload needs, add guidance such as the following to your system prompt:
|
||||
|
||||
```text wrap
|
||||
Extended thinking adds latency and should only be used when it
|
||||
will meaningfully improve answer quality, typically for problems
|
||||
that require multistep reasoning. When in doubt, respond directly.
|
||||
```
|
||||
|
||||
To encourage thinking instead, use a phrase such as:
|
||||
|
||||
```text wrap
|
||||
This task involves multistep reasoning. Think carefully before responding.
|
||||
```
|
||||
|
||||
Steering effectiveness can be sensitive to exact wording. If one phrasing doesn’t produce the behavior you want, try a more direct variant.
|
||||
|
||||
### Per-message steering
|
||||
|
||||
You can also steer thinking on a per-message basis from the user turn, independently of the system prompt. Appending `"Please think hard before responding."` to a user message encourages Claude to think on that turn; `"Answer directly without deliberating."` discourages it.
|
||||
|
||||
Per-message steering is useful when only some requests in a conversation warrant extended reasoning. An agent harness, for example, can append the encouraging phrase on planning steps and the discouraging phrase on routine confirmations, without touching the system prompt or changing any request parameters between turns.
|
||||
|
||||
On Claude Haiku 5.5, the discouraging phrase doesn’t reliably reduce thinking. Where your platform supports it, run routine turns on that model with less thinking by using a [per-message effort change](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta) instead, which also keeps the prompt cache.
|
||||
|
||||
### Verify steering on your workload
|
||||
|
||||
Prompt-based steering changes model behavior, so treat it like any other prompt change: measure before you ship. Run a representative sample of your traffic with and without the guidance, and compare how often thinking triggers (the presence of thinking blocks in responses), output token usage, latency, and answer quality on the cases that matter to you.
|
||||
|
||||
<Warning>
|
||||
Steering Claude to think less often might reduce quality on tasks that benefit from reasoning. Lowering the [effort](https://platform.claude.com/docs/en/build-with-claude/effort) level is usually the better first lever, because it is a calibrated control rather than a wording-sensitive instruction. Measure the impact on your specific workloads before deploying prompt-based tuning to production.
|
||||
</Warning>
|
||||
|
||||
## Mechanics
|
||||
|
||||
Three mechanics follow from Claude managing its own thinking: turn validation, prompt caching, and how you bound cost.
|
||||
|
||||
### Turn validation
|
||||
|
||||
Assistant turns don’t need to start with a thinking block. (Models using a legacy manual thinking budget enforce that the final assistant turn of a thinking-enabled request starts with one; see [Turn structure in manual mode](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#turn-structure-in-manual-mode).)
|
||||
|
||||
For multi-turn applications, this means you can pass back conversation history in whatever shape you have it:
|
||||
|
||||
* Assistant turns that Claude produced without thinking are valid history as-is.
|
||||
* You can resume a conversation that started without thinking, or that used a different thinking configuration, without rewriting its history.
|
||||
* History assembled from mixed sources doesn’t need thinking blocks reinserted at the start of each assistant turn to pass validation.
|
||||
|
||||
The relaxation is about validation, not about what you should send. When you have thinking blocks, pass them back unmodified, particularly during tool use, where they carry the reasoning behind Claude’s tool calls. See the [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) overview for the full rules.
|
||||
|
||||
### Prompt caching
|
||||
|
||||
Consecutive requests that keep the same thinking configuration and effort level preserve prompt caching; see [Thinking and prompt caching](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-prompt-caching) for the full rules. The resolved effort value is rendered into the prompt, so changing it between requests invalidates cache breakpoints, just as changing the legacy [`budget_tokens`](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#extended-thinking-with-prompt-caching) parameter does on models that use it. Setting `effort` explicitly to the model’s default is equivalent to omitting it and does not break the cache.
|
||||
|
||||
The practical consequence: pick a thinking configuration and a top-level effort level for each conversation and keep them. If some turns need more or less thinking, use a [per-message effort change](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) (beta) on models that support it, or steer with [per-message prompting](https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost#tuning-thinking-behavior). Both leave earlier cache breakpoints intact, where a change to the thinking configuration or the top-level effort level does not.
|
||||
|
||||
The following example demonstrates the invalidation with a multi-turn script you can run yourself:
|
||||
|
||||
<Accordion title="Effort changes invalidate the prompt cache">
|
||||
<CodeGroup exclude="shell:cURL, shell:CLI">
|
||||
<CodeGroupItem language="cURL">
|
||||
This workflow needs more logic than a single shell command. Use the Claude SDK to run it; per-turn HTTP requests follow the examples on the [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) page.
|
||||
</CodeGroupItem>
|
||||
|
||||
<CodeGroupItem language="CLI">
|
||||
This workflow needs more logic than a single shell command. Use the Claude SDK to run it; per-turn CLI commands follow the examples on the [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) page.
|
||||
</CodeGroupItem>
|
||||
|
||||
```python Python
|
||||
import requests
|
||||
|
||||
client = Anthropic()
|
||||
|
||||
|
||||
def fetch_article_content(url):
|
||||
text = requests.get(url).text
|
||||
lines = (line.strip() for line in text.splitlines())
|
||||
return "\n".join(line for line in lines if line)
|
||||
|
||||
|
||||
# Fetch the content of the article
|
||||
book_url = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"
|
||||
book_content = fetch_article_content(book_url)
|
||||
# Use just enough text for caching (first few chapters)
|
||||
LARGE_TEXT = book_content[:10000]
|
||||
|
||||
# No system prompt: caching in messages instead
|
||||
MESSAGES = [
|
||||
{
|
||||
"role": "user",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": LARGE_TEXT,
|
||||
"cache_control": {"type": "ephemeral"},
|
||||
},
|
||||
{"type": "text", "text": "Analyze the tone of this passage."},
|
||||
],
|
||||
}
|
||||
]
|
||||
|
||||
# First request: establish cache
|
||||
print("First request - establishing cache")
|
||||
response1 = client.messages.create(
|
||||
model="claude-opus-5-5",
|
||||
max_tokens=16000,
|
||||
thinking={"type": "adaptive"},
|
||||
messages=MESSAGES,
|
||||
)
|
||||
|
||||
print(f"First response usage: {response1.usage}")
|
||||
|
||||
MESSAGES.append({"role": "assistant", "content": response1.content})
|
||||
MESSAGES.append({"role": "user", "content": "Analyze the characters in this passage."})
|
||||
|
||||
# Second request: same configuration (cache hit expected)
|
||||
print("\nSecond request - same configuration (cache hit expected)")
|
||||
response2 = client.messages.create(
|
||||
model="claude-opus-5-5",
|
||||
max_tokens=16000,
|
||||
thinking={"type": "adaptive"},
|
||||
messages=MESSAGES,
|
||||
)
|
||||
|
||||
print(f"Second response usage: {response2.usage}")
|
||||
|
||||
MESSAGES.append({"role": "assistant", "content": response2.content})
|
||||
MESSAGES.append({"role": "user", "content": "Analyze the setting in this passage."})
|
||||
|
||||
# Third request: different effort level (cache miss expected)
|
||||
print("\nThird request - different effort level (cache miss expected)")
|
||||
response3 = client.messages.create(
|
||||
model="claude-opus-5-5",
|
||||
max_tokens=16000,
|
||||
thinking={"type": "adaptive"},
|
||||
output_config={"effort": "low"},
|
||||
messages=MESSAGES,
|
||||
)
|
||||
|
||||
print(f"Third response usage: {response3.usage}")
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
|
||||
const client = new Anthropic();
|
||||
|
||||
async function fetchArticleContent(url: string): Promise<string> {
|
||||
const response = await fetch(url);
|
||||
const text = await response.text();
|
||||
const lines = text.split("\n").map((line) => line.trim());
|
||||
return lines.filter((line) => line).join("\n");
|
||||
}
|
||||
|
||||
const bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt";
|
||||
const bookContent = await fetchArticleContent(bookUrl);
|
||||
const LARGE_TEXT = bookContent.substring(0, 10000);
|
||||
|
||||
// No system prompt: caching in messages instead
|
||||
const messages: Anthropic.MessageParam[] = [
|
||||
{
|
||||
role: "user",
|
||||
content: [
|
||||
{
|
||||
type: "text",
|
||||
text: LARGE_TEXT,
|
||||
cache_control: { type: "ephemeral" }
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
text: "Analyze the tone of this passage."
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
// First request: establish cache
|
||||
console.log("First request - establishing cache");
|
||||
const response1 = await client.messages.create({
|
||||
model: "claude-opus-5-5",
|
||||
max_tokens: 16000,
|
||||
thinking: { type: "adaptive" },
|
||||
messages
|
||||
});
|
||||
|
||||
console.log("First response usage: ", response1.usage);
|
||||
|
||||
messages.push(
|
||||
{ role: "assistant", content: response1.content },
|
||||
{ role: "user", content: "Analyze the characters in this passage." }
|
||||
);
|
||||
|
||||
// Second request: same configuration (cache hit expected)
|
||||
console.log("\nSecond request - same configuration (cache hit expected)");
|
||||
const response2 = await client.messages.create({
|
||||
model: "claude-opus-5-5",
|
||||
max_tokens: 16000,
|
||||
thinking: { type: "adaptive" },
|
||||
messages
|
||||
});
|
||||
|
||||
console.log("Second response usage: ", response2.usage);
|
||||
|
||||
messages.push(
|
||||
{ role: "assistant", content: response2.content },
|
||||
{ role: "user", content: "Analyze the setting in this passage." }
|
||||
);
|
||||
|
||||
// Third request: different effort level (cache miss expected)
|
||||
console.log("\nThird request - different effort level (cache miss expected)");
|
||||
const response3 = await client.messages.create({
|
||||
model: "claude-opus-5-5",
|
||||
max_tokens: 16000,
|
||||
thinking: { type: "adaptive" },
|
||||
output_config: { effort: "low" },
|
||||
messages
|
||||
});
|
||||
|
||||
console.log("Third response usage: ", response3.usage);
|
||||
```
|
||||
|
||||
```csharp C#
|
||||
AnthropicClient client = new();
|
||||
|
||||
string bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt";
|
||||
string bookContent = await FetchArticleContent(bookUrl);
|
||||
string largeText = bookContent.Substring(0, Math.Min(10000, bookContent.Length));
|
||||
|
||||
Console.WriteLine("First request - establishing cache");
|
||||
var parameters1 = new MessageCreateParams
|
||||
{
|
||||
Model = Model.ClaudeOpus5_5,
|
||||
MaxTokens = 16000,
|
||||
Thinking = new ThinkingConfigAdaptive(),
|
||||
Messages =
|
||||
[
|
||||
new UserMessageParam
|
||||
{
|
||||
Content = new List<ContentBlockParam>
|
||||
{
|
||||
new ContentBlockParam(new TextBlockParam()
|
||||
{
|
||||
Text = largeText,
|
||||
CacheControl = new CacheControlEphemeral(),
|
||||
}),
|
||||
new ContentBlockParam(new TextBlockParam()
|
||||
{
|
||||
Text = "Analyze the tone of this passage."
|
||||
}),
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var response1 = await client.Messages.Create(parameters1);
|
||||
Console.WriteLine($"First response usage: {response1.Usage}");
|
||||
|
||||
Console.WriteLine("\nSecond request - same configuration (cache hit expected)");
|
||||
var parameters2 = new MessageCreateParams
|
||||
{
|
||||
Model = Model.ClaudeOpus5_5,
|
||||
MaxTokens = 16000,
|
||||
Thinking = new ThinkingConfigAdaptive(),
|
||||
Messages =
|
||||
[
|
||||
new UserMessageParam
|
||||
{
|
||||
Content = new List<ContentBlockParam>
|
||||
{
|
||||
new ContentBlockParam(new TextBlockParam()
|
||||
{
|
||||
Text = largeText,
|
||||
CacheControl = new CacheControlEphemeral(),
|
||||
}),
|
||||
new ContentBlockParam(new TextBlockParam()
|
||||
{
|
||||
Text = "Analyze the tone of this passage."
|
||||
}),
|
||||
}
|
||||
},
|
||||
new AssistantMessageParam
|
||||
{
|
||||
Content = response1.Content.Select(block => new ContentBlockParam(block.Json)).ToList()
|
||||
},
|
||||
new UserMessageParam { Content = "Analyze the characters in this passage." }
|
||||
]
|
||||
};
|
||||
|
||||
var response2 = await client.Messages.Create(parameters2);
|
||||
Console.WriteLine($"Second response usage: {response2.Usage}");
|
||||
|
||||
Console.WriteLine("\nThird request - different effort level (cache miss expected)");
|
||||
var parameters3 = new MessageCreateParams
|
||||
{
|
||||
Model = Model.ClaudeOpus5_5,
|
||||
MaxTokens = 16000,
|
||||
Thinking = new ThinkingConfigAdaptive(),
|
||||
OutputConfig = new OutputConfig
|
||||
{
|
||||
Effort = Effort.Low
|
||||
},
|
||||
Messages =
|
||||
[
|
||||
new UserMessageParam
|
||||
{
|
||||
Content = new List<ContentBlockParam>
|
||||
{
|
||||
new ContentBlockParam(new TextBlockParam()
|
||||
{
|
||||
Text = largeText,
|
||||
CacheControl = new CacheControlEphemeral(),
|
||||
}),
|
||||
new ContentBlockParam(new TextBlockParam()
|
||||
{
|
||||
Text = "Analyze the tone of this passage."
|
||||
}),
|
||||
}
|
||||
},
|
||||
new AssistantMessageParam
|
||||
{
|
||||
Content = response1.Content.Select(block => new ContentBlockParam(block.Json)).ToList()
|
||||
},
|
||||
new UserMessageParam { Content = "Analyze the characters in this passage." },
|
||||
new AssistantMessageParam
|
||||
{
|
||||
Content = response2.Content.Select(block => new ContentBlockParam(block.Json)).ToList()
|
||||
},
|
||||
new UserMessageParam { Content = "Analyze the setting in this passage." }
|
||||
]
|
||||
};
|
||||
|
||||
var response3 = await client.Messages.Create(parameters3);
|
||||
Console.WriteLine($"Third response usage: {response3.Usage}");
|
||||
|
||||
static async Task<string> FetchArticleContent(string url)
|
||||
{
|
||||
using HttpClient httpClient = new();
|
||||
string content = await httpClient.GetStringAsync(url);
|
||||
return content;
|
||||
}
|
||||
```
|
||||
|
||||
```go Go
|
||||
client := anthropic.NewClient()
|
||||
|
||||
bookURL := "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"
|
||||
bookContent, err := fetchArticleContent(bookURL)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
largeText := bookContent
|
||||
if len(largeText) > 10000 {
|
||||
largeText = largeText[:10000]
|
||||
}
|
||||
|
||||
// No system prompt: caching in messages instead
|
||||
messages := []anthropic.MessageParam{
|
||||
anthropic.NewUserMessage(
|
||||
anthropic.ContentBlockParamUnion{OfText: &anthropic.TextBlockParam{
|
||||
Text: largeText,
|
||||
CacheControl: anthropic.NewCacheControlEphemeralParam(),
|
||||
}},
|
||||
anthropic.NewTextBlock("Analyze the tone of this passage."),
|
||||
),
|
||||
}
|
||||
|
||||
// First request: establish cache
|
||||
fmt.Println("First request - establishing cache")
|
||||
response1, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
|
||||
Model: anthropic.ModelClaudeOpus5_5,
|
||||
MaxTokens: 16000,
|
||||
Thinking: anthropic.ThinkingConfigParamUnion{
|
||||
OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},
|
||||
},
|
||||
Messages: messages,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
fmt.Printf("First response usage: %s\n", response1.Usage.RawJSON())
|
||||
|
||||
messages = append(messages, response1.ToParam())
|
||||
messages = append(messages, anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the characters in this passage.")))
|
||||
|
||||
// Second request: same configuration (cache hit expected)
|
||||
fmt.Println("\nSecond request - same configuration (cache hit expected)")
|
||||
response2, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
|
||||
Model: anthropic.ModelClaudeOpus5_5,
|
||||
MaxTokens: 16000,
|
||||
Thinking: anthropic.ThinkingConfigParamUnion{
|
||||
OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},
|
||||
},
|
||||
Messages: messages,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
fmt.Printf("Second response usage: %s\n", response2.Usage.RawJSON())
|
||||
|
||||
messages = append(messages, response2.ToParam())
|
||||
messages = append(messages, anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the setting in this passage.")))
|
||||
|
||||
// Third request: different effort level (cache miss expected)
|
||||
fmt.Println("\nThird request - different effort level (cache miss expected)")
|
||||
response3, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
|
||||
Model: anthropic.ModelClaudeOpus5_5,
|
||||
MaxTokens: 16000,
|
||||
Thinking: anthropic.ThinkingConfigParamUnion{
|
||||
OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},
|
||||
},
|
||||
OutputConfig: anthropic.OutputConfigParam{
|
||||
Effort: anthropic.OutputConfigEffortLow,
|
||||
},
|
||||
Messages: messages,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
fmt.Printf("Third response usage: %s\n", response3.Usage.RawJSON())
|
||||
```
|
||||
|
||||
```java Java
|
||||
import com.anthropic.models.messages.CacheControlEphemeral;
|
||||
// ...
|
||||
void main() throws Exception {
|
||||
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
|
||||
|
||||
String bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt";
|
||||
String bookContent = fetchArticleContent(bookUrl);
|
||||
String largeText = bookContent.substring(0, Math.min(10000, bookContent.length()));
|
||||
|
||||
// First request: establish cache
|
||||
IO.println("First request - establishing cache");
|
||||
MessageCreateParams params1 = MessageCreateParams.builder()
|
||||
.model(Model.CLAUDE_OPUS_5_5)
|
||||
.maxTokens(16000L)
|
||||
.thinking(ThinkingConfigAdaptive.builder().build())
|
||||
.addUserMessageOfContentBlockParams(List.of(
|
||||
ContentBlockParam.ofText(TextBlockParam.builder()
|
||||
.text(largeText)
|
||||
.cacheControl(CacheControlEphemeral.builder().build())
|
||||
.build()),
|
||||
ContentBlockParam.ofText(TextBlockParam.builder()
|
||||
.text("Analyze the tone of this passage.")
|
||||
.build())
|
||||
))
|
||||
.build();
|
||||
|
||||
Message response1 = client.messages().create(params1);
|
||||
IO.println("First response usage: " + response1.usage());
|
||||
|
||||
// Second request: same configuration (cache hit expected)
|
||||
IO.println("\nSecond request - same configuration (cache hit expected)");
|
||||
MessageCreateParams params2 = MessageCreateParams.builder()
|
||||
.model(Model.CLAUDE_OPUS_5_5)
|
||||
.maxTokens(16000L)
|
||||
.thinking(ThinkingConfigAdaptive.builder().build())
|
||||
.addUserMessageOfContentBlockParams(List.of(
|
||||
ContentBlockParam.ofText(TextBlockParam.builder()
|
||||
.text(largeText)
|
||||
.cacheControl(CacheControlEphemeral.builder().build())
|
||||
.build()),
|
||||
ContentBlockParam.ofText(TextBlockParam.builder()
|
||||
.text("Analyze the tone of this passage.")
|
||||
.build())
|
||||
))
|
||||
.addAssistantMessageOfContentBlockParams(response1.content().stream()
|
||||
.map(block -> block.toParam())
|
||||
.collect(Collectors.toList()))
|
||||
.addUserMessage("Analyze the characters in this passage.")
|
||||
.build();
|
||||
|
||||
Message response2 = client.messages().create(params2);
|
||||
IO.println("Second response usage: " + response2.usage());
|
||||
|
||||
// Third request: different effort level (cache miss expected)
|
||||
IO.println("\nThird request - different effort level (cache miss expected)");
|
||||
MessageCreateParams params3 = MessageCreateParams.builder()
|
||||
.model(Model.CLAUDE_OPUS_5_5)
|
||||
.maxTokens(16000L)
|
||||
.thinking(ThinkingConfigAdaptive.builder().build())
|
||||
.outputConfig(OutputConfig.builder()
|
||||
.effort(OutputConfig.Effort.LOW)
|
||||
.build())
|
||||
.addUserMessageOfContentBlockParams(List.of(
|
||||
ContentBlockParam.ofText(TextBlockParam.builder()
|
||||
.text(largeText)
|
||||
.cacheControl(CacheControlEphemeral.builder().build())
|
||||
.build()),
|
||||
ContentBlockParam.ofText(TextBlockParam.builder()
|
||||
.text("Analyze the tone of this passage.")
|
||||
.build())
|
||||
))
|
||||
.addAssistantMessageOfContentBlockParams(response1.content().stream()
|
||||
.map(block -> block.toParam())
|
||||
.collect(Collectors.toList()))
|
||||
.addUserMessage("Analyze the characters in this passage.")
|
||||
.addAssistantMessageOfContentBlockParams(response2.content().stream()
|
||||
.map(block -> block.toParam())
|
||||
.collect(Collectors.toList()))
|
||||
.addUserMessage("Analyze the setting in this passage.")
|
||||
.build();
|
||||
|
||||
Message response3 = client.messages().create(params3);
|
||||
IO.println("Third response usage: " + response3.usage());
|
||||
}
|
||||
|
||||
String fetchArticleContent(String url) throws Exception {
|
||||
HttpClient client = HttpClient.newHttpClient();
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(URI.create(url))
|
||||
.build();
|
||||
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
||||
return response.body();
|
||||
}
|
||||
```
|
||||
|
||||
```php PHP
|
||||
function fetchArticleContent($url)
|
||||
{
|
||||
$content = file_get_contents($url);
|
||||
$lines = explode("\n", $content);
|
||||
$cleanedLines = array_filter(array_map('trim', $lines));
|
||||
return implode("\n", $cleanedLines);
|
||||
}
|
||||
|
||||
$client = new Client();
|
||||
|
||||
$bookUrl = 'https://www.gutenberg.org/cache/epub/1342/pg1342.txt';
|
||||
$bookContent = fetchArticleContent($bookUrl);
|
||||
$largeText = substr($bookContent, 0, 10000);
|
||||
|
||||
echo "First request - establishing cache\n";
|
||||
$response1 = $client->messages->create(
|
||||
maxTokens: 16000,
|
||||
messages: [[
|
||||
'role' => 'user',
|
||||
'content' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'text' => $largeText,
|
||||
'cache_control' => ['type' => 'ephemeral']
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'text' => 'Analyze the tone of this passage.'
|
||||
]
|
||||
]
|
||||
]],
|
||||
model: 'claude-opus-5-5',
|
||||
thinking: ['type' => 'adaptive'],
|
||||
);
|
||||
|
||||
echo 'First response usage: ' . json_encode($response1->usage) . "\n";
|
||||
|
||||
echo "\nSecond request - same configuration (cache hit expected)\n";
|
||||
$response2 = $client->messages->create(
|
||||
maxTokens: 16000,
|
||||
messages: [
|
||||
[
|
||||
'role' => 'user',
|
||||
'content' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'text' => $largeText,
|
||||
'cache_control' => ['type' => 'ephemeral']
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'text' => 'Analyze the tone of this passage.'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'role' => 'assistant',
|
||||
'content' => $response1->content
|
||||
],
|
||||
[
|
||||
'role' => 'user',
|
||||
'content' => 'Analyze the characters in this passage.'
|
||||
]
|
||||
],
|
||||
model: 'claude-opus-5-5',
|
||||
thinking: ['type' => 'adaptive'],
|
||||
);
|
||||
|
||||
echo 'Second response usage: ' . json_encode($response2->usage) . "\n";
|
||||
|
||||
echo "\nThird request - different effort level (cache miss expected)\n";
|
||||
$response3 = $client->messages->create(
|
||||
maxTokens: 16000,
|
||||
messages: [
|
||||
[
|
||||
'role' => 'user',
|
||||
'content' => [
|
||||
[
|
||||
'type' => 'text',
|
||||
'text' => $largeText,
|
||||
'cache_control' => ['type' => 'ephemeral']
|
||||
],
|
||||
[
|
||||
'type' => 'text',
|
||||
'text' => 'Analyze the tone of this passage.'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'role' => 'assistant',
|
||||
'content' => $response1->content
|
||||
],
|
||||
[
|
||||
'role' => 'user',
|
||||
'content' => 'Analyze the characters in this passage.'
|
||||
],
|
||||
[
|
||||
'role' => 'assistant',
|
||||
'content' => $response2->content
|
||||
],
|
||||
[
|
||||
'role' => 'user',
|
||||
'content' => 'Analyze the setting in this passage.'
|
||||
]
|
||||
],
|
||||
model: 'claude-opus-5-5',
|
||||
thinking: ['type' => 'adaptive'],
|
||||
outputConfig: ['effort' => 'low'],
|
||||
);
|
||||
|
||||
echo 'Third response usage: ' . json_encode($response3->usage) . "\n";
|
||||
```
|
||||
|
||||
```ruby Ruby
|
||||
require "net/http"
|
||||
require "uri"
|
||||
|
||||
def fetch_article_content(url)
|
||||
uri = URI.parse(url)
|
||||
response = Net::HTTP.get_response(uri)
|
||||
text = response.body
|
||||
|
||||
lines = text.split("\n").map(&:strip)
|
||||
lines.reject(&:empty?).join("\n")
|
||||
end
|
||||
|
||||
client = Anthropic::Client.new
|
||||
|
||||
book_url = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"
|
||||
book_content = fetch_article_content(book_url)
|
||||
large_text = book_content[0...10000]
|
||||
|
||||
puts "First request - establishing cache"
|
||||
response1 = client.messages.create(
|
||||
model: "claude-opus-5-5",
|
||||
max_tokens: 16000,
|
||||
thinking: {
|
||||
type: "adaptive"
|
||||
},
|
||||
messages: [{
|
||||
role: "user",
|
||||
content: [
|
||||
{
|
||||
type: "text",
|
||||
text: large_text,
|
||||
cache_control: { type: "ephemeral" }
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
text: "Analyze the tone of this passage."
|
||||
}
|
||||
]
|
||||
}]
|
||||
)
|
||||
|
||||
puts "First response usage: #{response1.usage}"
|
||||
|
||||
puts "\nSecond request - same configuration (cache hit expected)"
|
||||
response2 = client.messages.create(
|
||||
model: "claude-opus-5-5",
|
||||
max_tokens: 16000,
|
||||
thinking: {
|
||||
type: "adaptive"
|
||||
},
|
||||
messages: [
|
||||
{
|
||||
role: "user",
|
||||
content: [
|
||||
{
|
||||
type: "text",
|
||||
text: large_text,
|
||||
cache_control: { type: "ephemeral" }
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
text: "Analyze the tone of this passage."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
role: "assistant",
|
||||
content: response1.content
|
||||
},
|
||||
{
|
||||
role: "user",
|
||||
content: "Analyze the characters in this passage."
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
puts "Second response usage: #{response2.usage}"
|
||||
|
||||
puts "\nThird request - different effort level (cache miss expected)"
|
||||
response3 = client.messages.create(
|
||||
model: "claude-opus-5-5",
|
||||
max_tokens: 16000,
|
||||
thinking: {
|
||||
type: "adaptive"
|
||||
},
|
||||
output_config: {
|
||||
effort: "low"
|
||||
},
|
||||
messages: [
|
||||
{
|
||||
role: "user",
|
||||
content: [
|
||||
{
|
||||
type: "text",
|
||||
text: large_text,
|
||||
cache_control: { type: "ephemeral" }
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
text: "Analyze the tone of this passage."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
role: "assistant",
|
||||
content: response1.content
|
||||
},
|
||||
{
|
||||
role: "user",
|
||||
content: "Analyze the characters in this passage."
|
||||
},
|
||||
{
|
||||
role: "assistant",
|
||||
content: response2.content
|
||||
},
|
||||
{
|
||||
role: "user",
|
||||
content: "Analyze the setting in this passage."
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
puts "Third response usage: #{response3.usage}"
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
Here is the output of the script (you might see slightly different numbers):
|
||||
|
||||
```text Output wrap
|
||||
First request - establishing cache
|
||||
First response usage: { cache_creation_input_tokens: 3546, cache_read_input_tokens: 0, input_tokens: 15, output_tokens: 1033 }
|
||||
|
||||
Second request - same configuration (cache hit expected)
|
||||
Second response usage: { cache_creation_input_tokens: 0, cache_read_input_tokens: 3546, input_tokens: 1062, output_tokens: 1630 }
|
||||
|
||||
Third request - different effort level (cache miss expected)
|
||||
Third response usage: { cache_creation_input_tokens: 3546, cache_read_input_tokens: 0, input_tokens: 2706, output_tokens: 1468 }
|
||||
```
|
||||
|
||||
With the cache breakpoint in the messages array, changing effort from `medium`, the default on Claude Opus 5.5, to `low` invalidates it: the third request shows `cache_creation_input_tokens=3546` and `cache_read_input_tokens=0` where the second showed a full cache read.
|
||||
</Accordion>
|
||||
|
||||
### Cost control
|
||||
|
||||
You don’t set a thinking token budget. Two controls bound cost:
|
||||
|
||||
* `max_tokens` is a hard cap on total output for the request, thinking and response text combined. Claude never generates past it. In a tool-use loop, each request in the turn has its own `max_tokens`, so it doesn’t bound the whole turn’s spend.
|
||||
* `effort` is soft guidance on how much of that output Claude allocates to thinking. It shapes behavior but doesn’t guarantee a token count.
|
||||
|
||||
Because thinking counts toward `max_tokens`, set it high enough to leave room for both the reasoning and the answer. A `max_tokens` sized for a response with no thinking is often too small once Claude starts thinking on hard requests.
|
||||
|
||||
At `high` effort and above, Claude might think extensively and is more likely to exhaust the budget. If you see [`stop_reason: "max_tokens"`](https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting#stopped-at-max-tokens) in responses, you have two remedies:
|
||||
|
||||
* Raise `max_tokens` to give the model more room for thinking plus the answer.
|
||||
* Lower the effort level so Claude thinks less and leaves more of the budget for response text.
|
||||
|
||||
Which one is right depends on whether the truncated responses needed the reasoning. If quality on those requests matters, raise the cap; if they were over-thought, lower the effort.
|
||||
|
||||
## Pricing
|
||||
|
||||
Thinking incurs charges for:
|
||||
|
||||
* Tokens Claude uses while thinking (billed as output tokens)
|
||||
* Thinking blocks from prior assistant turns that remain in context, according to the [preservation default](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-block-preservation-by-model): all turns by default on keep-all models, only the last turn elsewhere (billed as input tokens)
|
||||
* Standard text output tokens
|
||||
|
||||
<Note>
|
||||
When thinking is active, a specialized system prompt is automatically included to support this feature.
|
||||
</Note>
|
||||
|
||||
What you’re billed for is the same regardless of the `display` setting; only what you see changes:
|
||||
|
||||
| | `display: "summarized"` | `display: "omitted"` |
|
||||
| --------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
|
||||
| **Input tokens** | Tokens in your original request | Same as summarized |
|
||||
| **Output tokens (billed)** | The full thinking tokens Claude generated internally | Same as summarized |
|
||||
| **Output tokens (visible)** | The summarized thinking text | Zero thinking tokens (the `thinking` field is empty) |
|
||||
| **Summary generation** | No charge | Not applicable |
|
||||
|
||||
<Warning>
|
||||
The billed output token count does **not** match the visible token count in the response. You are billed for the full thinking process, not the thinking content visible in the response.
|
||||
</Warning>
|
||||
|
||||
To see how many billed output tokens were spent on internal reasoning, read `usage.output_tokens_details.thinking_tokens` in the response. This value reflects the raw reasoning the model generated (not the summarized text returned in the body) and is always less than or equal to `output_tokens`. Subtract it from `output_tokens` to approximate the non-reasoning portion of the output. When streaming, this breakdown appears only on the final `message_delta` event.
|
||||
|
||||
```json
|
||||
{
|
||||
"usage": {
|
||||
"input_tokens": 25,
|
||||
"output_tokens": 348,
|
||||
"output_tokens_details": {
|
||||
"thinking_tokens": 312
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`output_tokens` remains the inclusive, authoritative total used for billing. `output_tokens_details` is a read-only breakdown for observability. For complete pricing information including base rates, cache writes, cache hits, and output tokens, see [Pricing](https://platform.claude.com/docs/en/about-claude/pricing).
|
||||
|
||||
## Next steps
|
||||
|
||||
<CardGroup cols={3}>
|
||||
<Card title="Thinking" icon="brain" href="https://platform.claude.com/docs/en/build-with-claude/thinking">
|
||||
Turn thinking on, read thinking output, and check per-model support.
|
||||
</Card>
|
||||
|
||||
<Card title="Thinking in tool and multi-turn workflows" icon="wrench" href="https://platform.claude.com/docs/en/build-with-claude/thinking-tool-workflows">
|
||||
Preserve thinking blocks across tool calls and manage thinking in multi-turn conversations.
|
||||
</Card>
|
||||
|
||||
<Card title="Effort" icon="sliders" href="https://platform.claude.com/docs/en/build-with-claude/effort">
|
||||
Control how much thinking and output Claude allocates for each request.
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
|
||||
+1319
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,743 @@
|
||||
---
|
||||
title: Effort
|
||||
url: https://platform.claude.com/docs/en/build-with-claude/effort
|
||||
description: Control how many tokens Claude uses when responding with the effort parameter, trading off between response thoroughness and token efficiency.
|
||||
featureMetadata:
|
||||
status: stable
|
||||
zdr:
|
||||
eligibility: eligible
|
||||
note: Excludes [Covered Models](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements).
|
||||
supportedModels:
|
||||
- claude-fable-5-1
|
||||
- claude-mythos-5-1
|
||||
- claude-fable-5
|
||||
- claude-mythos-5
|
||||
- claude-mythos-preview
|
||||
- claude-opus-5-5
|
||||
- claude-opus-5
|
||||
- claude-sonnet-5-5
|
||||
- claude-sonnet-5
|
||||
- claude-haiku-5-5
|
||||
- claude-opus-4-8
|
||||
- claude-opus-4-7
|
||||
- claude-opus-4-6
|
||||
- claude-sonnet-4-6
|
||||
- claude-opus-4-5-20251101
|
||||
supportedPlatforms:
|
||||
Claude API: stable
|
||||
Claude Platform on AWS: stable
|
||||
Claude Models on Google Cloud (Anthropic managed): stable
|
||||
Amazon Bedrock: stable
|
||||
Amazon Bedrock (InvokeModel): stable
|
||||
Claude Models on Google Cloud (Google managed): stable
|
||||
Microsoft Foundry: stable
|
||||
---
|
||||
|
||||
**API support**: Usage differs by product.
|
||||
|
||||
* **Messages API**: Set `output_config.effort` on the request. With no value, the model’s default level applies.
|
||||
* **Managed Agents**: Set `effort` on the agent’s model object, or in a session’s model override. With no value, Managed Agents fills in the model’s default.
|
||||
|
||||
The effort parameter lets you control how many tokens Claude spends when responding to requests. You can trade off between response thoroughness and token efficiency with a single model. The top-level effort parameter is available on all supported models with no beta header required. [Per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) is in beta.
|
||||
|
||||
<Tip>
|
||||
To learn how effort interacts with thinking and which control to reach for, see [Thinking and effort](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-effort). Where adaptive thinking is available, effort is the recommended way to control thinking depth.
|
||||
</Tip>
|
||||
|
||||
## Set the effort level
|
||||
|
||||
Set `output_config.effort` on the request. The following example runs one request at `medium` effort.
|
||||
|
||||
<CodeGroup>
|
||||
```bash cURL
|
||||
curl https://api.anthropic.com/v1/messages \
|
||||
-H "x-api-key: $ANTHROPIC_API_KEY" \
|
||||
-H "anthropic-version: 2026-10-21" \
|
||||
-H "content-type: application/json" \
|
||||
-d '{
|
||||
"model": "claude-opus-5-5",
|
||||
"max_tokens": 4096,
|
||||
"messages": [{
|
||||
"role": "user",
|
||||
"content": "Analyze the trade-offs between microservices and monolithic architectures"
|
||||
}],
|
||||
"output_config": {
|
||||
"effort": "medium"
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
```bash CLI
|
||||
ant messages create \
|
||||
--model claude-opus-5-5 \
|
||||
--max-tokens 4096 \
|
||||
--output-config '{effort: medium}' \
|
||||
--message '{role: user, content: "Analyze the trade-offs between microservices and monolithic architectures"}'
|
||||
```
|
||||
|
||||
```python Python
|
||||
client = anthropic.Anthropic()
|
||||
|
||||
response = client.messages.create(
|
||||
model="claude-opus-5-5",
|
||||
max_tokens=4096,
|
||||
messages=[
|
||||
{
|
||||
"role": "user",
|
||||
"content": "Analyze the trade-offs between microservices and monolithic architectures",
|
||||
}
|
||||
],
|
||||
output_config={"effort": "medium"},
|
||||
)
|
||||
|
||||
for block in response.content:
|
||||
if block.type == "text":
|
||||
print(block.text)
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
const client = new Anthropic();
|
||||
|
||||
const response = await client.messages.create({
|
||||
model: "claude-opus-5-5",
|
||||
max_tokens: 4096,
|
||||
messages: [
|
||||
{
|
||||
role: "user",
|
||||
content: "Analyze the trade-offs between microservices and monolithic architectures"
|
||||
}
|
||||
],
|
||||
output_config: {
|
||||
effort: "medium"
|
||||
}
|
||||
});
|
||||
|
||||
const textBlock = response.content.find((block) => block.type === "text");
|
||||
console.log(textBlock?.text);
|
||||
```
|
||||
|
||||
```csharp C#
|
||||
AnthropicClient client = new();
|
||||
|
||||
var parameters = new MessageCreateParams
|
||||
{
|
||||
Model = Model.ClaudeOpus5_5,
|
||||
MaxTokens = 4096,
|
||||
Messages = [
|
||||
new UserMessageParam
|
||||
{
|
||||
Content = "Analyze the trade-offs between microservices and monolithic architectures"
|
||||
}
|
||||
],
|
||||
OutputConfig = new OutputConfig
|
||||
{
|
||||
Effort = Effort.Medium
|
||||
}
|
||||
};
|
||||
|
||||
var message = await client.Messages.Create(parameters);
|
||||
Console.WriteLine(message);
|
||||
```
|
||||
|
||||
```go Go
|
||||
client := anthropic.NewClient()
|
||||
|
||||
response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
|
||||
Model: anthropic.ModelClaudeOpus5_5,
|
||||
MaxTokens: 4096,
|
||||
Messages: []anthropic.MessageParam{
|
||||
anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the trade-offs between microservices and monolithic architectures")),
|
||||
},
|
||||
OutputConfig: anthropic.OutputConfigParam{
|
||||
Effort: anthropic.OutputConfigEffortMedium,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
for _, block := range response.Content {
|
||||
if textBlock, ok := block.AsAny().(anthropic.TextBlock); ok {
|
||||
fmt.Println(textBlock.Text)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```java Java
|
||||
import com.anthropic.models.messages.OutputConfig;
|
||||
|
||||
void main() {
|
||||
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
|
||||
|
||||
MessageCreateParams params = MessageCreateParams.builder()
|
||||
.model(Model.CLAUDE_OPUS_5_5)
|
||||
.maxTokens(4096L)
|
||||
.addUserMessage("Analyze the trade-offs between microservices and monolithic architectures")
|
||||
.outputConfig(OutputConfig.builder()
|
||||
.effort(OutputConfig.Effort.MEDIUM)
|
||||
.build())
|
||||
.build();
|
||||
|
||||
Message response = client.messages().create(params);
|
||||
response.content().stream()
|
||||
.flatMap(block -> block.text().stream())
|
||||
.forEach(textBlock -> IO.println(textBlock.text()));
|
||||
}
|
||||
```
|
||||
|
||||
```php PHP
|
||||
$client = new Client();
|
||||
|
||||
$message = $client->messages->create(
|
||||
maxTokens: 4096,
|
||||
messages: [
|
||||
['role' => 'user', 'content' => 'Analyze the trade-offs between microservices and monolithic architectures']
|
||||
],
|
||||
model: 'claude-opus-5-5',
|
||||
outputConfig: ['effort' => 'medium'],
|
||||
);
|
||||
|
||||
foreach ($message->content as $block) {
|
||||
if ($block->type === 'text') {
|
||||
echo $block->text, PHP_EOL;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```ruby Ruby
|
||||
client = Anthropic::Client.new
|
||||
|
||||
message = client.messages.create(
|
||||
model: Anthropic::Model::CLAUDE_OPUS_5_5,
|
||||
max_tokens: 4096,
|
||||
messages: [
|
||||
{ role: "user", content: "Analyze the trade-offs between microservices and monolithic architectures" }
|
||||
],
|
||||
output_config: {
|
||||
effort: "medium"
|
||||
}
|
||||
)
|
||||
|
||||
message.content.each do |block|
|
||||
puts block.text if block.type == :text
|
||||
end
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
## How effort works
|
||||
|
||||
Most Claude models default to high effort, spending as many tokens as needed for excellent results; Claude Opus 5.5 and Claude Haiku 5.5 default to medium. You can raise the effort level to `max` for the absolute highest capability, or lower it to be more conservative with token usage, optimizing for speed and cost while accepting some reduction in capability.
|
||||
|
||||
<Tip>
|
||||
Setting `effort` to the model’s default (`"medium"` on Claude Opus 5.5 and Claude Haiku 5.5, `"high"` on other models) produces exactly the same behavior as omitting the `effort` parameter entirely.
|
||||
</Tip>
|
||||
|
||||
The effort parameter affects **all tokens** in the response, including:
|
||||
|
||||
* Text responses and explanations
|
||||
* Tool calls and function arguments
|
||||
* Thinking (when active)
|
||||
|
||||
Because effort applies to every output token, it works with or without thinking. Lower effort also means fewer and terser tool calls.
|
||||
|
||||
### Effort levels
|
||||
|
||||
| Level | Description | Typical use case |
|
||||
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
||||
| `max` | Absolute maximum capability with no constraints on token spending. Available on Claude Fable 5.1, Claude Mythos 5.1, Claude Fable 5, Claude Mythos 5, Claude Mythos Preview, Claude Opus 5.5, Claude Opus 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 5.5, Claude Sonnet 5, Claude Sonnet 4.6, and Claude Haiku 5.5. | Tasks requiring the deepest possible reasoning and most thorough analysis |
|
||||
| `xhigh` | Extended capability for long-horizon work. Available on Claude Fable 5.1, Claude Mythos 5.1, Claude Fable 5, Claude Mythos 5, Claude Opus 5.5, Claude Opus 5, Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5.5, Claude Sonnet 5, and Claude Haiku 5.5. | Long-running agentic and coding tasks (over 30 minutes) with token budgets in the millions |
|
||||
| `high` | Spends as many tokens as the task needs for excellent results. The default on every model that supports effort except Claude Opus 5.5 and Claude Haiku 5.5. | Complex reasoning, difficult coding problems, agentic tasks |
|
||||
| `medium` | Balanced approach with moderate token savings. The default on Claude Opus 5.5 and Claude Haiku 5.5. | Agentic tasks that require a balance of speed, cost, and performance |
|
||||
| `low` | Most efficient. Significant token savings with some capability reduction. | Simpler tasks that need the best speed and lowest costs, such as subagents |
|
||||
|
||||
Not every model that supports `max` supports `xhigh`.
|
||||
|
||||
<Note>
|
||||
Effort is a behavioral signal, not a strict token budget. At lower effort levels, Claude still thinks on sufficiently difficult problems, but thinks less than it would at higher effort levels for the same problem.
|
||||
</Note>
|
||||
|
||||
The per-model recommendations that follow override this table where they differ.
|
||||
|
||||
## Recommended effort levels
|
||||
|
||||
**[Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) & [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview)** — *For demanding reasoning and long-horizon agentic work*
|
||||
|
||||
Claude Fable 5.1 supports all five effort levels. **Start with `high`, the default.** Step up to `xhigh` or `max` for the most capability-sensitive agentic and coding work, and step down to `medium` or `low` for routine or latency-sensitive work once your evals show quality holds. At `high` and above, set a large `max_tokens`. It’s a hard limit on total output (thinking plus response text).
|
||||
|
||||
Claude Fable 5.1 also supports [changing effort mid-conversation](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) with a per-message `output_config`, which preserves the prompt cache.
|
||||
|
||||
See also: [Prompting Claude Fable 5.1](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#consider-all-effort-levels)
|
||||
|
||||
**[Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview)** — *For long-running agentic coding and knowledge work*
|
||||
|
||||
Claude Opus 5.5 supports all five effort levels, and `medium` is the default (Claude Opus 5 and earlier Opus models default to `high`, so a request that omits `effort` runs one level lower than it did on Claude Opus 5). Adaptive thinking is always on and can’t be turned off, so effort is the primary control for how much the model reasons and what a request costs. Run an effort sweep on your own evals rather than carrying settings over from an earlier model, and set a large `max_tokens` at the higher levels: it’s a hard limit on total output (thinking plus response text). Requests that set `thinking: {"type": "disabled"}` return a 400 error at every effort level. Claude Opus 5.5 also supports [changing effort mid-conversation](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) with a per-message `output_config`, which preserves the prompt cache.
|
||||
|
||||
See also: [Prompting Claude Opus 5.5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5-5)
|
||||
|
||||
**[Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview)** — *The best combination of speed and intelligence*
|
||||
|
||||
Claude Sonnet 5.5 supports all five effort levels, and `high` is the default on the Claude API. Its levels are recalibrated, so a level doesn’t produce the same amount of thinking as the same level on Claude Sonnet 5. Run a fresh effort sweep on your evals rather than carrying over the setting you used on Claude Sonnet 5. Start with `high` unless your workload is agentic or latency-sensitive. For agentic coding and multistep tool use, start with `medium` for well-specified tasks and move to `high` for harder or longer ones. For chat and other latency-sensitive work, start with `medium` or `low`. Use `xhigh` or `max` only where your evals show a quality gain. Set `max_tokens` with room for thinking and the reply. Thinking counts toward `max_tokens` even when the thinking content isn’t returned. For agentic coding, set `max_tokens` to 128,000, the model’s maximum, and [stream](https://platform.claude.com/docs/en/build-with-claude/streaming) the response.
|
||||
|
||||
To turn off up-front thinking, send `thinking: {"type": "between_tools"}` instead of `"disabled"`. It’s the lowest thinking setting on Claude Sonnet 5.5, and it works at `low`, `medium`, and `high` effort. At `xhigh` or `max`, a request with it returns a 400 error, so use adaptive thinking at those levels: omit the `thinking` field or send `thinking: {"type": "adaptive"}`. See [Running without up-front thinking](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5#running-without-up-front-thinking).
|
||||
|
||||
Claude Sonnet 5.5 also supports [changing effort mid-conversation](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) with a per-message `output_config`, which preserves the prompt cache. With `between_tools`, effort can’t change mid-conversation: a per-message `output_config.effort` that differs from the level in effect returns a 400 error. To vary effort for each turn, use adaptive thinking.
|
||||
|
||||
See also: [Prompting Claude Sonnet 5.5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5#calibrate-effort)
|
||||
|
||||
**[Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/overview)** — *For high-volume, latency-sensitive tasks such as classification, extraction, and routing*
|
||||
|
||||
Claude Haiku 5.5 supports all five effort levels, and `medium` is the default. Effort is the main control for how much the model thinks, and with it quality, latency, and cost. **Start with `medium`** for most work, including agentic coding. Use `low`, the cheapest and fastest level, for chat, short tool tasks, and simple, high-volume requests. In long agent prompts, the model is more likely to skip a search, stop early, or skip a check at `low`. Use `high` for knowledge work, longer agent tasks, and strict instruction following. Use `xhigh` or `max` only where your evals show a quality gain, and compare them with Claude Sonnet 5.5 on performance, cost, and speed. Thinking is on by default and counts toward `max_tokens`, so leave room for it.
|
||||
|
||||
To get less thinking, lower the effort level. You can also send `thinking: {"type": "disabled"}` at `high` effort or below. At `xhigh` or `max`, it returns a 400 error, so use adaptive thinking there: omit the `thinking` field or send `thinking: {"type": "adaptive"}`.
|
||||
|
||||
Where your platform supports it, Claude Haiku 5.5 also lets you [change effort mid-conversation](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) with a per-message `output_config`, which preserves the prompt cache. With `thinking: {"type": "disabled"}`, effort can’t change mid-conversation: a per-message `output_config.effort` that differs from the level in effect returns a 400 error. To vary effort for each turn, use adaptive thinking.
|
||||
|
||||
See also: [Prompting Claude Haiku 5.5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5#use-effort-to-control-thinking)
|
||||
|
||||
**[Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/overview) & [Claude Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview)**
|
||||
|
||||
Effort is the primary control for trading off intelligence, latency, and cost on Claude Fable 5. **Start with `high`, the default, for most tasks**, use `xhigh` for the most capability-sensitive workloads, and step down to `medium` or `low` for routine work. Lower effort settings on Claude Fable 5 still perform well and often exceed `xhigh` performance on prior models. At `high` and `xhigh`, set a large `max_tokens`. It’s a hard limit on total output (thinking plus response text). See [Cost control](https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost#cost-control).
|
||||
|
||||
Reduce effort if a task completes but takes longer than necessary, or if you want a faster, more interactive working style.
|
||||
|
||||
See also: [Prompting Claude Fable 5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5)
|
||||
|
||||
**[Claude Opus 5](https://platform.claude.com/docs/en/models/opus-5/overview)**
|
||||
|
||||
Claude Opus 5 supports all five effort levels. **Start with `high`, the default**, and adjust based on your evals: step up to `xhigh` for demanding coding and agentic work, or to `max` when a task justifies unconstrained token spending. Use `low` and `medium` liberally as your primary control for token cost and response time wherever your evals show quality holds. If you carried effort settings over from an earlier model, run a fresh effort sweep on your evals rather than reusing them.
|
||||
|
||||
Effort controls thinking volume, not visible response length: on Claude Opus 5, changing effort does not reliably shorten responses, so [prompt for length](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5#response-length-and-verbosity) instead.
|
||||
|
||||
The API default is `high`. Set `effort` explicitly to use a different level. The value you pass overrides the default.
|
||||
|
||||
On Claude Opus 5, thinking cannot be disabled at `xhigh` or `max` effort: requests that set `thinking: {"type": "disabled"}` at those levels return a 400 error. See [Effort with thinking](https://platform.claude.com/docs/en/build-with-claude/effort#effort-with-thinking).
|
||||
|
||||
When running Claude Opus 5 at `xhigh` or `max` effort, set a large `max_tokens` so the model has room to think and act across subagents and tool calls. Starting at 64k tokens and tuning from there is a reasonable default.
|
||||
|
||||
Claude Opus 5 also supports [changing effort mid-conversation](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) with a per-message `output_config`, which preserves the prompt cache. Per-message effort isn’t available for Claude Opus 5 on Amazon Bedrock.
|
||||
|
||||
See also: [Prompting Claude Opus 5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5)
|
||||
|
||||
**[Claude Opus 4.8](https://platform.claude.com/docs/en/models/opus-4-8/overview)**
|
||||
|
||||
The guidance for Claude Opus 4.7 also applies to Claude Opus 4.8. **Start with `xhigh` for coding and agentic use cases**, use `high` for most other intelligence-sensitive workloads, and step down to `medium` or `low` only when you’ve measured that the lower level holds quality on your evals.
|
||||
|
||||
The API default is `high`. Set `effort` explicitly to use a different level. The value you pass overrides the default.
|
||||
|
||||
When running Claude Opus 4.8 at `xhigh` or `max` effort, set a large `max_tokens` so the model has room to think and act across subagents and tool calls. Starting at 64k tokens and tuning from there is a reasonable default.
|
||||
|
||||
See also: [Prompting Claude Opus 4.8](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8)
|
||||
|
||||
**[Claude Opus 4.7](https://platform.claude.com/docs/en/models/opus-4-7/overview)**
|
||||
|
||||
**Start with `xhigh` for coding and agentic use cases**, and use `high` as the minimum for most intelligence-sensitive workloads. Step down to `medium` for cost-sensitive workloads, or up to `max` only when your evals show measurable headroom at `xhigh`.
|
||||
|
||||
The API default is `high`. To use `xhigh`, set `effort` explicitly. The value you pass overrides the default.
|
||||
|
||||
* **Low effort:** Efficient, but best for short, scoped tasks. Pair `low` with explicit checklists if your task has multiple sections.
|
||||
* **Medium effort:** The setting for the average workflow where you want good results while reducing costs.
|
||||
* **High effort:** Advanced use cases that still need a balance of intelligence and token consumption. This is often the best balance of quality and token efficiency.
|
||||
* **Xhigh effort:** The recommended starting point for coding and agentic work, and for exploratory tasks such as repeated tool calling, detailed web search, and knowledge-base search. Expect meaningfully higher token usage than `high`.
|
||||
* **Max effort:** Reserve for frontier problems. On most workloads `max` adds significant cost for relatively small quality gains, and on some structured-output or less intelligence-sensitive tasks it can lead to overthinking.
|
||||
|
||||
Claude Opus 4.7 also respects effort levels more strictly than Claude Opus 4.6, especially at `low` and `medium`. At lower effort levels, the model scopes its work to what was asked rather than doing more than requested. If you observe shallow reasoning on complex problems with Claude Opus 4.7, raise effort rather than prompting around it. If you must keep effort low for latency, add targeted guidance such as “This task involves multistep reasoning. Think carefully before responding.”
|
||||
|
||||
When running Claude Opus 4.7 at `xhigh` or `max` effort, set a large `max_tokens` so the model has room to think and act across subagents and tool calls. Starting at 64k tokens and tuning from there is a reasonable default.
|
||||
|
||||
See also: [Prompting best practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices)
|
||||
|
||||
**[Claude Sonnet 5](https://platform.claude.com/docs/en/models/sonnet-5/overview)**
|
||||
|
||||
Claude Sonnet 5 defaults to `high` effort on the Claude API and Claude Code.
|
||||
|
||||
* **High effort (default):** Suitable for complex reasoning, coding, and agentic tasks where quality matters more than speed or cost.
|
||||
* **Xhigh effort:** For the hardest coding and agentic tasks.
|
||||
* **Medium effort:** Cost-saving step-down from the default. Comparable to Claude Sonnet 4.6 at high effort.
|
||||
* **Low effort:** For high-volume or latency-sensitive workloads. Suitable for chat and non-coding use cases where faster turnaround is prioritized.
|
||||
* **Max effort:** For tasks requiring the absolute highest capability with no constraints on token spending.
|
||||
|
||||
See also: [Prompting Claude Sonnet 5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5#calibrating-effort-and-thinking-depth)
|
||||
|
||||
**[Claude Sonnet 4.6](https://platform.claude.com/docs/en/models/sonnet-4-6/overview)**
|
||||
|
||||
Sonnet 4.6 defaults to `high` effort. Explicitly set effort when using Sonnet 4.6 to avoid unexpected latency:
|
||||
|
||||
* **Medium effort (recommended default):** Best balance of speed, cost, and performance for most applications. Suitable for agentic coding, tool-heavy workflows, and code generation.
|
||||
* **Low effort:** For high-volume or latency-sensitive workloads. Suitable for chat and non-coding use cases where faster turnaround is prioritized.
|
||||
* **High effort:** For complex reasoning and tasks where quality matters more than speed or cost.
|
||||
* **Max effort:** For tasks requiring the absolute highest capability with no constraints on token spending.
|
||||
|
||||
See also: [Prompting best practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices)
|
||||
|
||||
## Effort with tool use
|
||||
|
||||
When using tools, the effort parameter affects both the explanations around tool calls and the tool calls themselves. Lower effort levels tend to:
|
||||
|
||||
* Combine multiple operations into fewer tool calls
|
||||
* Make fewer tool calls
|
||||
* Proceed directly to action without preamble
|
||||
* Use terse confirmation messages after completion
|
||||
|
||||
Higher effort levels might:
|
||||
|
||||
* Make more tool calls
|
||||
* Explain the plan before taking action
|
||||
* Provide detailed summaries of changes
|
||||
* Include more comprehensive code comments
|
||||
|
||||
## Effort with thinking
|
||||
|
||||
The `thinking` parameter controls whether Claude thinks in [thinking blocks](https://platform.claude.com/docs/en/build-with-claude/thinking) before answering; the `effort` parameter controls how much work Claude puts into the whole response, which in adaptive mode includes how often and how deeply it thinks. Don’t pass `adaptive` as an `effort` value: `adaptive` is a thinking mode, not an effort level.
|
||||
|
||||
At higher effort levels, Claude thinks more readily and at greater length. In a tool-use loop, follow-up requests that only process tool results can still skip thinking at any level. At lower levels, Claude can skip thinking entirely for simpler problems. See [Thinking and effort](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-effort) for full guidance on how the two controls work together.
|
||||
|
||||
On Claude Opus 4.5, the only extended-thinking-only model that supports effort, it works alongside [`budget_tokens`](https://platform.claude.com/docs/en/build-with-claude/extended-thinking): set the effort level for your task, then set the thinking token budget based on how much reasoning depth the task needs.
|
||||
|
||||
For per-model thinking availability, see the [per-model configuration table](https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting#supported-models). Effort works with or without thinking. See [How effort works](https://platform.claude.com/docs/en/build-with-claude/effort#how-effort-works).
|
||||
|
||||
## Change effort mid-conversation
|
||||
|
||||
You can run later turns of a conversation at a different effort level in two ways. On Claude Fable 5.1, Claude Mythos 5.1, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, and Claude Haiku 5.5, use a per-message effort change, which keeps the prompt cache. On other models, set a new top-level value on the next request, which starts the cache over.
|
||||
|
||||
### Per-message effort (beta)
|
||||
|
||||
Per-message effort is in beta. On the Claude API and [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), it’s available on Claude Fable 5.1, Claude Mythos 5.1, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, and Claude Haiku 5.5. On [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), it’s available on Claude Fable 5.1, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, and Claude Haiku 5.5. On [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), it’s available on Claude Fable 5.1, Claude Mythos 5.1, and Claude Opus 5.5. It requires the [beta header](https://platform.claude.com/docs/en/api/beta-headers) `mid-conversation-output-config-2026-07-01`. With the Amazon Bedrock [InvokeModel API](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), it’s available on Claude Fable 5.1 and Claude Opus 5.5, and you send that value in the `anthropic_beta` array of the request body instead.
|
||||
|
||||
Without the beta value, a per-message `output_config` returns a 400 error: `messages.N.output_config: Extra inputs are not permitted`, where `N` is the index of the `system` message in `messages`. With the beta value, models without per-message effort, including Claude Fable 5, return a 400 error: `output_config.effort requires a model that supports per-turn effort; this model does not`. On Amazon Bedrock, those models and Claude Opus 5 return the `Extra inputs are not permitted` error instead. On Claude Sonnet 5.5 with `thinking: {"type": "between_tools"}` and on Claude Haiku 5.5 with `thinking: {"type": "disabled"}`, effort can’t change mid-conversation: a per-message `output_config.effort` that differs from the level in effect returns a 400 error. To vary effort for each turn, use adaptive thinking.
|
||||
|
||||
Add a `role: "system"` message with empty `content` and the new level in `output_config.effort`. Placed directly after a `user` turn with new input, it sets the level for Claude’s reply to that turn. Placed anywhere else, such as between an `assistant` turn and the next `user` turn as in the following example, it takes effect from the next `user` turn with new input. A `user` turn that holds only `tool_result` blocks doesn’t count as new input, so a change placed after one in a tool-use loop waits for the next `user` turn with new input. The new level then holds until a later message changes it. Everything before that message is unchanged, so the cached prefix still matches.
|
||||
|
||||
The following example starts at `high`, then drops to `low` for a routine follow-up:
|
||||
|
||||
<CodeGroup>
|
||||
```bash cURL
|
||||
# Effort-only system message: the new level takes effect from the next user turn.
|
||||
curl https://api.anthropic.com/v1/messages \
|
||||
-H "x-api-key: $ANTHROPIC_API_KEY" \
|
||||
-H "anthropic-version: 2026-10-21" \
|
||||
-H "anthropic-beta: mid-conversation-output-config-2026-07-01" \
|
||||
-H "content-type: application/json" \
|
||||
-d '{
|
||||
"model": "claude-fable-5-1",
|
||||
"max_tokens": 4096,
|
||||
"output_config": {"effort": "high"},
|
||||
"messages": [
|
||||
{"role": "user", "content": "Plan a migration from SQLite to PostgreSQL in three short steps."},
|
||||
{"role": "assistant", "content": "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."},
|
||||
{"role": "system", "content": [], "output_config": {"effort": "low"}},
|
||||
{"role": "user", "content": "Summarize the plan in one sentence."}
|
||||
]
|
||||
}'
|
||||
```
|
||||
|
||||
```bash CLI
|
||||
ant beta:messages create \
|
||||
--beta mid-conversation-output-config-2026-07-01 <<'YAML'
|
||||
model: claude-fable-5-1
|
||||
max_tokens: 4096
|
||||
output_config:
|
||||
effort: high
|
||||
messages:
|
||||
- role: user
|
||||
content: Plan a migration from SQLite to PostgreSQL in three short steps.
|
||||
- role: assistant
|
||||
content: "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."
|
||||
# Effort-only system message: the new level takes effect from the next user turn.
|
||||
- role: system
|
||||
content: []
|
||||
output_config:
|
||||
effort: low
|
||||
- role: user
|
||||
content: Summarize the plan in one sentence.
|
||||
YAML
|
||||
```
|
||||
|
||||
```python Python
|
||||
client = anthropic.Anthropic()
|
||||
|
||||
response = client.beta.messages.create(
|
||||
model="claude-fable-5-1",
|
||||
max_tokens=4096,
|
||||
output_config={"effort": "high"},
|
||||
messages=[
|
||||
{
|
||||
"role": "user",
|
||||
"content": "Plan a migration from SQLite to PostgreSQL in three short steps.",
|
||||
},
|
||||
{
|
||||
"role": "assistant",
|
||||
"content": "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.",
|
||||
},
|
||||
# Effort-only system message: the new level takes effect from the next user turn.
|
||||
{"role": "system", "content": [], "output_config": {"effort": "low"}},
|
||||
{"role": "user", "content": "Summarize the plan in one sentence."},
|
||||
],
|
||||
betas=["mid-conversation-output-config-2026-07-01"],
|
||||
)
|
||||
|
||||
for block in response.content:
|
||||
if block.type == "text":
|
||||
print(block.text)
|
||||
```
|
||||
|
||||
```typescript TypeScript
|
||||
const client = new Anthropic();
|
||||
|
||||
const response = await client.beta.messages.create({
|
||||
model: "claude-fable-5-1",
|
||||
max_tokens: 4096,
|
||||
output_config: { effort: "high" },
|
||||
messages: [
|
||||
{
|
||||
role: "user",
|
||||
content: "Plan a migration from SQLite to PostgreSQL in three short steps."
|
||||
},
|
||||
{
|
||||
role: "assistant",
|
||||
content:
|
||||
"1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."
|
||||
},
|
||||
// Effort-only system message: the new level takes effect from the next user turn.
|
||||
{ role: "system", content: [], output_config: { effort: "low" } },
|
||||
{ role: "user", content: "Summarize the plan in one sentence." }
|
||||
],
|
||||
betas: ["mid-conversation-output-config-2026-07-01"]
|
||||
});
|
||||
|
||||
for (const block of response.content) {
|
||||
if (block.type === "text") {
|
||||
console.log(block.text);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```csharp C#
|
||||
using Anthropic.Models.Beta;
|
||||
using Anthropic.Models.Beta.Messages;
|
||||
using Model = Anthropic.Models.Messages.Model;
|
||||
|
||||
AnthropicClient client = new();
|
||||
|
||||
var response = await client.Beta.Messages.Create(new MessageCreateParams
|
||||
{
|
||||
Model = Model.ClaudeFable5_1,
|
||||
MaxTokens = 4096,
|
||||
OutputConfig = new() { Effort = Effort.High },
|
||||
Messages =
|
||||
[
|
||||
new BetaUserMessageParam { Content = "Plan a migration from SQLite to PostgreSQL in three short steps." },
|
||||
new BetaAssistantMessageParam { Content = "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts." },
|
||||
// Effort-only system message: the new level takes effect from the next user turn.
|
||||
new BetaSystemMessageParam
|
||||
{
|
||||
Content = new([]),
|
||||
OutputConfig = new() { Effort = BetaSystemMessageOutputConfigEffort.Low },
|
||||
},
|
||||
new BetaUserMessageParam { Content = "Summarize the plan in one sentence." },
|
||||
],
|
||||
Betas = [AnthropicBeta.MidConversationOutputConfig2026_07_01],
|
||||
});
|
||||
|
||||
foreach (var block in response.Content)
|
||||
{
|
||||
if (block.TryPickText(out var textBlock))
|
||||
{
|
||||
Console.WriteLine(textBlock.Text);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```go Go
|
||||
client := anthropic.NewClient()
|
||||
|
||||
response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{
|
||||
Model: anthropic.ModelClaudeFable5_1,
|
||||
MaxTokens: 4096,
|
||||
OutputConfig: anthropic.BetaOutputConfigParam{
|
||||
Effort: anthropic.BetaOutputConfigEffortHigh,
|
||||
},
|
||||
Messages: []anthropic.BetaMessageParam{
|
||||
anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Plan a migration from SQLite to PostgreSQL in three short steps.")),
|
||||
{OfAssistant: &anthropic.BetaAssistantMessageParam{
|
||||
Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")},
|
||||
}},
|
||||
// Effort-only system message: the new level takes effect from the next user turn.
|
||||
anthropic.NewBetaSystemMessage(anthropic.BetaSystemMessageOutputConfigParam{
|
||||
Effort: anthropic.BetaSystemMessageOutputConfigEffortLow,
|
||||
}),
|
||||
anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Summarize the plan in one sentence.")),
|
||||
},
|
||||
Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaMidConversationOutputConfig2026_07_01},
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
for _, block := range response.Content {
|
||||
if textBlock, ok := block.AsAny().(anthropic.BetaTextBlock); ok {
|
||||
fmt.Println(textBlock.Text)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```java Java
|
||||
import com.anthropic.models.beta.AnthropicBeta;
|
||||
import com.anthropic.models.beta.messages.BetaMessage;
|
||||
import com.anthropic.models.beta.messages.BetaOutputConfig;
|
||||
import com.anthropic.models.beta.messages.BetaSystemMessageOutputConfig;
|
||||
import com.anthropic.models.beta.messages.BetaSystemMessageParam;
|
||||
import com.anthropic.models.beta.messages.MessageCreateParams;
|
||||
import com.anthropic.models.messages.Model;
|
||||
|
||||
void main() {
|
||||
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
|
||||
|
||||
MessageCreateParams params = MessageCreateParams.builder()
|
||||
.model(Model.CLAUDE_FABLE_5_1)
|
||||
.maxTokens(4096L)
|
||||
.addBeta(AnthropicBeta.MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01)
|
||||
.outputConfig(BetaOutputConfig.builder()
|
||||
.effort(BetaOutputConfig.Effort.HIGH)
|
||||
.build())
|
||||
.addUserMessage("Plan a migration from SQLite to PostgreSQL in three short steps.")
|
||||
.addAssistantMessage("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")
|
||||
// Effort-only system message: the new level takes effect from the next user turn.
|
||||
.addMessage(BetaSystemMessageParam.builder()
|
||||
.contentOfBlocks(List.of())
|
||||
.outputConfig(BetaSystemMessageOutputConfig.builder()
|
||||
.effort(BetaSystemMessageOutputConfig.Effort.LOW)
|
||||
.build())
|
||||
.build())
|
||||
.addUserMessage("Summarize the plan in one sentence.")
|
||||
.build();
|
||||
|
||||
BetaMessage response = client.beta().messages().create(params);
|
||||
response.content().stream()
|
||||
.flatMap(block -> block.text().stream())
|
||||
.forEach(textBlock -> IO.println(textBlock.text()));
|
||||
}
|
||||
```
|
||||
|
||||
```php PHP
|
||||
use Anthropic\Beta\AnthropicBeta;
|
||||
use Anthropic\Beta\Messages\BetaMessageParam;
|
||||
use Anthropic\Beta\Messages\BetaOutputConfig;
|
||||
use Anthropic\Beta\Messages\BetaSystemMessageOutputConfig;
|
||||
use Anthropic\Client;
|
||||
|
||||
$client = new Client();
|
||||
|
||||
$response = $client->beta->messages->create(
|
||||
model: 'claude-fable-5-1',
|
||||
maxTokens: 4096,
|
||||
outputConfig: BetaOutputConfig::with(effort: 'high'),
|
||||
messages: [
|
||||
BetaMessageParam::with(role: 'user', content: 'Plan a migration from SQLite to PostgreSQL in three short steps.'),
|
||||
BetaMessageParam::with(role: 'assistant', content: '1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.'),
|
||||
// Effort-only system message: the new level takes effect from the next user turn.
|
||||
BetaMessageParam::with(
|
||||
role: 'system',
|
||||
content: [],
|
||||
outputConfig: BetaSystemMessageOutputConfig::with(effort: 'low'),
|
||||
),
|
||||
BetaMessageParam::with(role: 'user', content: 'Summarize the plan in one sentence.'),
|
||||
],
|
||||
betas: [AnthropicBeta::MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01],
|
||||
);
|
||||
|
||||
foreach ($response->content as $block) {
|
||||
if ($block->type === 'text') {
|
||||
echo $block->text, PHP_EOL;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```ruby Ruby
|
||||
client = Anthropic::Client.new
|
||||
|
||||
response = client.beta.messages.create(
|
||||
model: Anthropic::Model::CLAUDE_FABLE_5_1,
|
||||
max_tokens: 4096,
|
||||
output_config: {effort: :high},
|
||||
messages: [
|
||||
{role: "user", content: "Plan a migration from SQLite to PostgreSQL in three short steps."},
|
||||
{role: "assistant", content: "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."},
|
||||
# Effort-only system message: the new level takes effect from the next user turn.
|
||||
{role: "system", content: [], output_config: {effort: :low}},
|
||||
{role: "user", content: "Summarize the plan in one sentence."}
|
||||
],
|
||||
betas: [Anthropic::AnthropicBeta::MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01]
|
||||
)
|
||||
|
||||
response.content.each do |block|
|
||||
puts block.text if block.type == :text
|
||||
end
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
An effort-only system message carries no text, so the [placement rules for mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#limitations) don’t apply. It can appear anywhere in `messages`, including as the first entry or between an `assistant` turn and the next `user` turn. Values are the level names (`low`, `medium`, `high`, `xhigh`, and `max`).
|
||||
|
||||
Prefer this form over changing the top-level value between requests. A top-level change restarts the cache and, on Claude Fable 5.1, also steers the model less reliably: its earlier replies were written at the previous level, and it tends to stay consistent with them.
|
||||
|
||||
### Top-level effort on the next request
|
||||
|
||||
The top-level `output_config.effort` applies to the whole request. To run a later part of a conversation at a different level, set the new value on the next request. Because top-level effort shapes the rendered prompt, changing it between requests doesn’t preserve cached prefixes from earlier turns. If you rely on [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) across a long session and your model doesn’t support per-message effort, pick an effort level at the start and keep it constant.
|
||||
|
||||
## Best practices
|
||||
|
||||
1. **Set effort explicitly:** The API defaults to `high` (`medium` on Claude Opus 5.5 and Claude Haiku 5.5), but the right starting point depends on your model and workload.
|
||||
2. **Use low for speed-sensitive or simple tasks:** When latency matters or tasks are straightforward, low effort can significantly reduce response times and costs.
|
||||
3. **Test your use case:** The impact of effort levels varies by task type. Evaluate performance on your specific use cases before deploying.
|
||||
4. **Consider dynamic effort:** Adjust effort based on task complexity. Simple queries might warrant low effort, whereas agentic coding and complex reasoning benefit from high effort. See the next item before varying it within one conversation.
|
||||
5. **Hold top-level effort constant within cached conversations:** Changing the top-level effort value between requests invalidates [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching), so vary it across workloads rather than within a conversation that relies on cache hits. On models that support it, use a [per-message effort change](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) instead, which preserves the cache. See [Thinking and prompt caching](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-prompt-caching).
|
||||
|
||||
## Next steps
|
||||
|
||||
<CardGroup>
|
||||
<Card title="Task budgets" icon="gauge" href="https://platform.claude.com/docs/en/build-with-claude/task-budgets">
|
||||
Give Claude an advisory token budget for the full agentic loop to help the model self-regulate on long agentic tasks.
|
||||
</Card>
|
||||
|
||||
<Card title="Steering thinking" icon="compass" href="https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost">
|
||||
Understand adaptive thinking, where Claude determines when and how much to think, and steer it with effort and prompting.
|
||||
</Card>
|
||||
|
||||
<Card title="Thinking" icon="brain" href="https://platform.claude.com/docs/en/build-with-claude/thinking">
|
||||
Understand how thinking works, when Claude thinks by default, and how thinking interacts with effort.
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
## Availability
|
||||
|
||||
Effort is available on select models and eligible for zero data retention and HIPAA readiness.
|
||||
|
||||
### API support
|
||||
|
||||
#### [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages)
|
||||
|
||||
* Availability: Always on
|
||||
* Usage: Set `output_config.effort` on the request. With no value, the model’s default level applies.
|
||||
|
||||
| Status | Cloud platforms | Models |
|
||||
| --------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Available | All supported platforms | [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview), [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview), [Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/overview), [Claude Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview), Claude Mythos Preview, [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview), [Claude Opus 5](https://platform.claude.com/docs/en/models/opus-5/overview), [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview), [Claude Sonnet 5](https://platform.claude.com/docs/en/models/sonnet-5/overview), [Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/overview), [Claude Opus 4.8](https://platform.claude.com/docs/en/models/opus-4-8/overview), [Claude Opus 4.7](https://platform.claude.com/docs/en/models/opus-4-7/overview), [Claude Opus 4.6](https://platform.claude.com/docs/en/models/opus-4-6/overview), [Claude Sonnet 4.6](https://platform.claude.com/docs/en/models/sonnet-4-6/overview), [Claude Opus 4.5](https://platform.claude.com/docs/en/models/opus-4-5/overview) |
|
||||
|
||||
#### [Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview)
|
||||
|
||||
* Availability: Always on
|
||||
* Usage: Set `effort` on the agent’s model object, or in a session’s model override. With no value, Managed Agents fills in the model’s default.
|
||||
|
||||
| Status | Cloud platforms | Models |
|
||||
| --------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Available | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview), [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview), [Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/overview), [Claude Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview), Claude Mythos Preview, [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview), [Claude Opus 5](https://platform.claude.com/docs/en/models/opus-5/overview), [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview), [Claude Sonnet 5](https://platform.claude.com/docs/en/models/sonnet-5/overview), [Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/overview), [Claude Opus 4.8](https://platform.claude.com/docs/en/models/opus-4-8/overview), [Claude Opus 4.7](https://platform.claude.com/docs/en/models/opus-4-7/overview), [Claude Opus 4.6](https://platform.claude.com/docs/en/models/opus-4-6/overview), [Claude Sonnet 4.6](https://platform.claude.com/docs/en/models/sonnet-4-6/overview), [Claude Opus 4.5](https://platform.claude.com/docs/en/models/opus-4-5/overview) |
|
||||
|
||||
### Data handling
|
||||
|
||||
[Data handling overview](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility)
|
||||
|
||||
| Item | Zero data retention | HIPAA |
|
||||
| ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
|
||||
| Status | Eligible (excludes [Covered Models](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements)) | Eligible |
|
||||
|
||||
Applicable endpoints:
|
||||
|
||||
* `/v1/messages` with `effort`
|
||||
@@ -0,0 +1,127 @@
|
||||
---
|
||||
title: Models overview
|
||||
url: https://platform.claude.com/docs/en/models/overview
|
||||
description: Claude is a family of state-of-the-art large language models developed by Anthropic. This guide introduces the available models and compares their performance.
|
||||
---
|
||||
|
||||
# Models overview
|
||||
|
||||
Claude is a family of state-of-the-art large language models developed by Anthropic. Compare the current lineup, find the model ID for every platform, and open each model's page for its full specs and resources.
|
||||
|
||||
<HomeQuickChip icon="Signpost" href="https://platform.claude.com/docs/en/about-claude/models/choosing-a-model">
|
||||
Choosing a model
|
||||
</HomeQuickChip>
|
||||
|
||||
<HomeQuickChip icon="DollarSign" href="https://platform.claude.com/docs/en/about-claude/pricing">
|
||||
Pricing
|
||||
</HomeQuickChip>
|
||||
|
||||
<HomeQuickChip icon="ArrowUpCircle" href="https://platform.claude.com/docs/en/about-claude/models/migration-guide">
|
||||
Migration guide
|
||||
</HomeQuickChip>
|
||||
|
||||
## Compare models
|
||||
|
||||
If you’re unsure which model to use, start with [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview) for most workloads. Use [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) for demanding reasoning and long-horizon agentic work, or when your evals on Claude Opus 5.5 at higher effort still fall short. All current models support text and image input, text output, multilingual capabilities, vision, and tool use. Each model’s page lists the platforms it’s available on.
|
||||
|
||||
| Feature | Claude Fable 5.1 | Claude Opus 5.5 | Claude Sonnet 5.5 | Claude Haiku 5.5 |
|
||||
| :------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------- | :------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------- |
|
||||
| Description | For demanding reasoning and long-horizon agentic work | For long-running agentic coding and knowledge work | The best combination of speed and intelligence | For high-volume, latency-sensitive tasks such as classification, extraction, and routing |
|
||||
| Model page | [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview) | [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview) | [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview) | [Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/overview) |
|
||||
| Comparative latency | Slower | Moderate | Fast | Fastest |
|
||||
| [Pricing](https://platform.claude.com/docs/en/about-claude/pricing) | $10 / input MTok, $50 / output MTok | $4 / input MTok, $20 / output MTok | $2 / input MTok, $10 / output MTok | From $0.10 / input MTok, From $0.50 / output MTok |
|
||||
| Claude API ID | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
|
||||
| [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) | Adaptive (always on) | Adaptive (always on) | Adaptive | Adaptive |
|
||||
| [Default effort](https://platform.claude.com/docs/en/build-with-claude/effort) | `high` | `medium` | `high` | `medium` |
|
||||
| [Context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) | 1M tokens | 1M tokens | 1M tokens | 1M tokens |
|
||||
| Max output | 128K tokens | 128K tokens | 128K tokens | 128K tokens |
|
||||
| Reliable knowledge cutoff | Jun 2026 | Jun 2026 | Jun 2026 | Jun 2026 |
|
||||
| Training data cutoff | Jun 2026 | Jun 2026 | Jun 2026 | Jun 2026 |
|
||||
| [Retirement](https://platform.claude.com/docs/en/about-claude/model-deprecations) | Not sooner than September 1, 2027 | Not sooner than September 22, 2027 | Not sooner than September 28, 2027 | Not sooner than October 7, 2027 |
|
||||
| Claude API alias | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
|
||||
| [Amazon Bedrock ID](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) | `anthropic.claude-fable-5-1` | `anthropic.claude-opus-5-5` | `anthropic.claude-sonnet-5-5` | `anthropic.claude-haiku-5-5` |
|
||||
| [Claude Models on Google Cloud (Google managed) ID](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
|
||||
| [Microsoft Foundry ID](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
|
||||
| [Claude Platform on AWS ID](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
|
||||
| [Claude Models on Google Cloud (Anthropic managed) ID](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | `claude-fable-5-1` | `claude-opus-5-5` | `claude-sonnet-5-5` | `claude-haiku-5-5` |
|
||||
|
||||
* **Comparative latency:** Relative to the current lineup. Actual latency depends on prompt length, output length, and thinking effort.
|
||||
* **Pricing:** Base price per million tokens. Batch API requests are 50% off; prompt cache reads cost 10% of the base input price (2.5% on Claude Fable 5.1 and Claude Mythos 5.1, 5% on Claude Opus 5.5 and Claude Sonnet 5.5). See Pricing for cache writes, long-context, and per-platform pricing.
|
||||
* **Claude API ID:** Every Claude model ID is a pinned snapshot, including the dateless IDs used from the 4.6 generation on.
|
||||
* **Thinking:** Adaptive thinking lets the model decide how much to think, steered by effort. Extended thinking is the manual thinking.type “enabled” + budget\_tokens mode on earlier models; it is deprecated on Claude Opus 4.6 and Claude Sonnet 4.6 and not accepted on later models.
|
||||
* **Default effort:** The effort parameter’s default on the Claude API. Set effort explicitly to use a different level.
|
||||
* **Context window:** 1M tokens is roughly 555k words or 2.5M Unicode characters on the current tokenizer (introduced with Claude Opus 4.7); models before it fit about 750k words in 1M tokens. 200k tokens is roughly 150k words.
|
||||
* **Max output:** Synchronous Messages API limit. On the Message Batches API, Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Sonnet 5, Claude Haiku 5.5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 4.6 support up to 300k output tokens with the output-300k-2026-03-24 beta header.
|
||||
* **Reliable knowledge cutoff:** The date through which the model’s knowledge is most extensive and reliable. Training data cutoff (under Additional details) is the broader range of data used. See Anthropic’s Transparency Hub for details.
|
||||
* **Retirement:** Anthropic’s commitment for the platforms that Anthropic operates. Partner-operated platforms set their own dates.
|
||||
* **Claude API alias:** For models before the 4.6 generation, the alias is a convenience pointer that resolves to the dated ID. Dateless IDs are their own pinned snapshot; the alias row repeats them.
|
||||
* **Amazon Bedrock ID:** The ID on Bedrock’s Messages-API endpoint (Claude Opus 4.7 and later, plus Claude Haiku 4.5); a model offered only through Bedrock’s InvokeModel integration shows that ID instead. Bedrock offers global endpoints (dynamic routing) and regional endpoints (guaranteed data routing) for Claude Sonnet 4.5 and later, and sets its own lifecycle dates.
|
||||
* **Claude Models on Google Cloud (Google managed) ID:** Claude Models on Google Cloud (Google managed) offers global, multi-region, and regional endpoints, and sets its own lifecycle dates.
|
||||
* **Microsoft Foundry ID:** Foundry deployments default to the Claude API model ID (the alias, where one exists); the deployment name is what you send. Foundry follows the Claude API lifecycle schedule.
|
||||
* **Claude Platform on AWS ID:** Claude Platform on AWS uses the Claude API model IDs (the dateless form where the Claude API has an alias), not Bedrock-style IDs, and follows Anthropic’s first-party model lifecycle.
|
||||
|
||||
See [Model IDs and versioning](https://platform.claude.com/docs/en/about-claude/models/model-ids-and-versions) and [Pricing](https://platform.claude.com/docs/en/about-claude/pricing).
|
||||
|
||||
Legacy models (still available): [Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/overview), [Claude Opus 5](https://platform.claude.com/docs/en/models/opus-5/overview), [Claude Opus 4.8](https://platform.claude.com/docs/en/models/opus-4-8/overview), [Claude Opus 4.7](https://platform.claude.com/docs/en/models/opus-4-7/overview), [Claude Opus 4.6](https://platform.claude.com/docs/en/models/opus-4-6/overview), [Claude Opus 4.5](https://platform.claude.com/docs/en/models/opus-4-5/overview), [Claude Sonnet 5](https://platform.claude.com/docs/en/models/sonnet-5/overview), [Claude Sonnet 4.6](https://platform.claude.com/docs/en/models/sonnet-4-6/overview), [Claude Haiku 4.5](https://platform.claude.com/docs/en/models/haiku-4-5/overview).
|
||||
|
||||
Once you’ve picked a model, [learn how to make your first API call](https://platform.claude.com/docs/en/get-started). To understand how model IDs, aliases, and snapshots work, see [Model IDs and versioning](https://platform.claude.com/docs/en/about-claude/models/model-ids-and-versions); for the reliable-knowledge and training-data cutoffs behind each model, see Anthropic’s [Transparency Hub](https://www.anthropic.com/transparency).
|
||||
|
||||
## Using the Models API
|
||||
|
||||
You can query model capabilities and token limits programmatically with the [Models API](https://platform.claude.com/docs/en/api/models/list). The response includes [`max_input_tokens`](https://platform.claude.com/docs/en/api/models#model_info.max_input_tokens), [`max_tokens`](https://platform.claude.com/docs/en/api/models#model_info.max_tokens), and a [`capabilities`](https://platform.claude.com/docs/en/api/models#model_info.capabilities) object for every available model.
|
||||
|
||||
Each model in the response also has a [`line`](https://platform.claude.com/docs/en/api/models#model_info.line) field, which names the model line it belongs to. Claude Opus 4.5 and Claude Opus 4.6 both report `opus`. Use `line` to group models, for example, in a model picker. `line` is `null` when a model belongs to no line. Read `line` instead of inferring it from the model’s `id`. Anthropic might add more lines, so don’t treat the set of values as fixed.
|
||||
|
||||
Each model’s `capabilities` object includes [`thinking.types.disabled`](https://platform.claude.com/docs/en/api/models#thinking_types.disabled), which reports whether the model accepts `thinking: {type: "disabled"}`, the setting that [turns thinking off](https://platform.claude.com/docs/en/build-with-claude/thinking#turning-thinking-off). `supported` is `false` when the model rejects `"disabled"` with a 400 error, and `true` on a model that doesn’t support thinking. Even when `supported` is `true`, the API can still reject a `"disabled"` request for another reason. One such reason is an [effort](https://platform.claude.com/docs/en/build-with-claude/effort) level that the model doesn’t allow with thinking off.
|
||||
|
||||
Each model’s `capabilities` object also includes [`thinking.types.between_tools`](https://platform.claude.com/docs/en/api/models#thinking_types.between_tools), which reports whether the model accepts `thinking: {type: "between_tools"}`, the setting that [turns off up-front thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#turning-thinking-off). `supported` is `false` when the model rejects `"between_tools"` with a 400 error. Even when `supported` is `true`, the API can still reject a `"between_tools"` request for another reason, such as an [effort](https://platform.claude.com/docs/en/build-with-claude/effort) level that the model doesn’t allow with `"between_tools"`. For Claude Sonnet 5.5, for example, the Models API reports `thinking.types.between_tools.supported` as `true` and `thinking.types.disabled.supported` as `false`.
|
||||
|
||||
Each model’s `capabilities` object also includes [`server_tools`](https://platform.claude.com/docs/en/api/models#model_capabilities.server_tools), which reports whether the model accepts the [web search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) and [code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) tools. It doesn’t cover other server tools, such as web fetch. `server_tools.web_search.supported` and `server_tools.code_execution.supported` are `true` when the model accepts at least one version of that tool, not necessarily every version. `server_tools.supported` is `true` when the model accepts at least one of the two tools. Even when a tool is supported, your organization’s settings can still cause a request that uses it to fail. For example, an administrator can [disable web search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool#how-to-use-web-search).
|
||||
|
||||
The top-level [`code_execution`](https://platform.claude.com/docs/en/api/models#model_capabilities.code_execution) capability is a different check. It reports whether code that Claude runs in the code execution tool can call the request’s other tools, as in [programmatic tool calling](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling). For Claude Haiku 4.5, for example, the Models API reports `server_tools.code_execution.supported` as `true` and `code_execution.supported` as `false`.
|
||||
|
||||
The API reference lists the List Models endpoint’s parameters and full response.
|
||||
|
||||
(See the `models/list` method in [the API reference](https://platform.claude.com/docs/en/api/models/list).)
|
||||
|
||||
## Prompt and output performance
|
||||
|
||||
Current Claude models excel in:
|
||||
|
||||
* **Performance:** Top-tier results in reasoning, coding, multilingual tasks, long-context handling, honesty, and image processing. See [Prompting best practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) for general and model-specific prompting guidance.
|
||||
* **Engaging responses:** Claude models are ideal for applications that require rich, human-like interactions. If you prefer more concise responses, adjust your prompts to guide the model toward the output length you want. Refer to the [prompt engineering guides](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering) for details.
|
||||
* **Output quality:** When migrating from a previous model generation, you might notice larger improvements in overall performance. If you’re on Claude Opus 5 or earlier, see the [Claude Opus 5.5 migration guide](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide).
|
||||
|
||||
## Get started with Claude
|
||||
|
||||
Whether you’re a developer looking to integrate Claude into your applications or a user wanting to experience the power of AI firsthand, the following resources can help.
|
||||
|
||||
<CardGroup cols={3}>
|
||||
<Card title="Intro to Claude" icon="check" href="https://platform.claude.com/docs/en/intro">
|
||||
Explore Claude’s capabilities and development flow.
|
||||
</Card>
|
||||
|
||||
<Card title="Quickstart" icon="lightning" href="https://platform.claude.com/docs/en/get-started">
|
||||
Learn how to make your first API call in minutes.
|
||||
</Card>
|
||||
|
||||
<Card title="Choosing a model" icon="compass" href="https://platform.claude.com/docs/en/about-claude/models/choosing-a-model">
|
||||
Establish criteria and pick the right model for your use case.
|
||||
</Card>
|
||||
|
||||
<Card title="Pricing" icon="coins" href="https://platform.claude.com/docs/en/about-claude/pricing">
|
||||
Complete pricing, including batch discounts and prompt caching rates.
|
||||
</Card>
|
||||
|
||||
<Card title="Model deprecations" icon="clock" href="https://platform.claude.com/docs/en/about-claude/model-deprecations">
|
||||
Lifecycle status and retirement commitments for every model.
|
||||
</Card>
|
||||
|
||||
<Card title="Claude Console" icon="code" href="https://platform.claude.com/">
|
||||
Craft and test prompts directly in your browser.
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
Looking to chat with Claude? Visit [claude.ai](https://claude.ai). If you have questions, contact the [support team](https://support.claude.com/) or the [Discord community](https://www.anthropic.com/discord).
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,46 @@
|
||||
# GPT-6 Astra
|
||||
|
||||
- Model ID: gpt-6-astra
|
||||
- Model type: reasoning
|
||||
- Current snapshot: gpt-6-astra
|
||||
|
||||
Our most capable model for the most demanding work.
|
||||
|
||||
GPT-6 Astra is our most capable model for the most demanding work.
|
||||
Use it for complex reasoning, coding, computer use, research, and document creation.
|
||||
`reasoning.effort` supports `low`, `medium`, `high`, `xhigh`, and `max`.
|
||||
|
||||
Get started with GPT-6 Astra using the [model guide](https://developers.openai.com/api/docs/guides/latest-model?model=gpt-6-astra).
|
||||
|
||||
## Snapshots
|
||||
- gpt-6-astra
|
||||
|
||||
## Current snapshot details
|
||||
- Context window: 1,050,000 tokens
|
||||
- Max input: 922,000 tokens
|
||||
- Max output: 128,000 tokens
|
||||
- Knowledge cutoff: 2026-04-30
|
||||
- Input modalities: text, image
|
||||
- Output modalities: text
|
||||
- Supported endpoints: responses, chat_completions, batch
|
||||
- Supported features: streaming, structured_outputs, function_calling, file_search, image_input, web_search, prompt_caching
|
||||
|
||||
## Supported tools
|
||||
- web_search
|
||||
- file_search
|
||||
- image_generation
|
||||
- code_interpreter
|
||||
- hosted_shell
|
||||
- apply_patch
|
||||
- skills
|
||||
- computer_use
|
||||
- mcp
|
||||
- tool_search
|
||||
|
||||
## Pricing notes
|
||||
- Prompts with more than 272K input tokens are priced at 2x input and cache rates and 1.5x output for the full request.
|
||||
- Cache writes are billed at 1.25x the uncached input token rate.
|
||||
- Batch and Flex are priced at 50% of Standard rates. Fast mode is priced at 2x the applicable rates.
|
||||
|
||||
Playground: https://platform.openai.com/chat/edit?models=gpt-6-astra
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
# GPT-6 Luna
|
||||
|
||||
- Model ID: gpt-6-luna
|
||||
- Model type: reasoning
|
||||
- Current snapshot: gpt-6-luna
|
||||
|
||||
Our most efficient model for focused, high-volume tasks.
|
||||
|
||||
GPT-6 Luna is our most efficient model for focused, high-volume tasks.
|
||||
|
||||
`reasoning.effort` supports `none`, `low`, `medium` (default), `high`, `xhigh`, and `max`.
|
||||
Use the Responses API for built-in tools and function calling. Chat Completions supports function calling only with `reasoning_effort` set to `none`.
|
||||
|
||||
EU data residency is available with Standard, Fast, Flex, and Batch processing.
|
||||
See [data residency eligibility](https://developers.openai.com/api/docs/guides/your-data#which-models-and-features-are-eligible-for-data-residency).
|
||||
|
||||
## Snapshots
|
||||
- gpt-6-luna
|
||||
|
||||
## Current snapshot details
|
||||
- Context window: 1,050,000 tokens
|
||||
- Max input: 922,000 tokens
|
||||
- Max output: 128,000 tokens
|
||||
- Knowledge cutoff: 2026-05-18
|
||||
- Input modalities: text, image
|
||||
- Output modalities: text
|
||||
- Supported endpoints: responses, chat_completions, batch
|
||||
- Supported features: streaming, structured_outputs, function_calling, file_search, image_input, web_search, prompt_caching
|
||||
|
||||
## Supported tools
|
||||
- web_search
|
||||
- file_search
|
||||
- image_generation
|
||||
- code_interpreter
|
||||
- hosted_shell
|
||||
- apply_patch
|
||||
- skills
|
||||
- computer_use
|
||||
- mcp
|
||||
- tool_search
|
||||
|
||||
## Pricing notes
|
||||
- Cached input tokens are priced at 10% of the uncached input token rate.
|
||||
- Cache writes are billed at 1.25x the uncached input token rate.
|
||||
- Prompts with more than 272K input tokens are priced at 2x input and cache rates and 1.5x output for the full request.
|
||||
- Regional processing adds a 10% premium where available. EU data residency is available with Standard, Fast, Flex, and Batch processing.
|
||||
- Batch and Flex are priced at 50% of Standard rates. Fast mode is priced at 2x the applicable rates.
|
||||
|
||||
Playground: https://platform.openai.com/chat/edit?models=gpt-6-luna
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
# GPT-6 Sol
|
||||
|
||||
- Model ID: gpt-6-sol
|
||||
- Model type: reasoning
|
||||
- Current snapshot: gpt-6-sol
|
||||
|
||||
Built to power complex coding and agentic workflows.
|
||||
|
||||
GPT-6 Sol is built for complex coding and agentic workflows.
|
||||
See [GPT-6.1 Sol](https://developers.openai.com/api/docs/models/gpt-6.1-sol) for the newer Sol model.
|
||||
|
||||
`reasoning.effort` supports `none`, `low`, `medium` (default), `high`, `xhigh`, and `max`.
|
||||
Use the Responses API for built-in tools and function calling. Chat Completions supports function calling only with `reasoning_effort` set to `none`.
|
||||
|
||||
EU data residency is available with Standard, Flex, and Batch processing. EU data residency is not available with Fast processing.
|
||||
See [data residency eligibility](https://developers.openai.com/api/docs/guides/your-data#which-models-and-features-are-eligible-for-data-residency).
|
||||
|
||||
## Snapshots
|
||||
- gpt-6-sol
|
||||
|
||||
## Current snapshot details
|
||||
- Context window: 1,050,000 tokens
|
||||
- Max input: 922,000 tokens
|
||||
- Max output: 128,000 tokens
|
||||
- Knowledge cutoff: 2026-04-20
|
||||
- Input modalities: text, image
|
||||
- Output modalities: text
|
||||
- Supported endpoints: responses, chat_completions, batch
|
||||
- Supported features: streaming, structured_outputs, function_calling, file_search, image_input, web_search, prompt_caching
|
||||
|
||||
## Supported tools
|
||||
- web_search
|
||||
- file_search
|
||||
- image_generation
|
||||
- code_interpreter
|
||||
- hosted_shell
|
||||
- apply_patch
|
||||
- skills
|
||||
- computer_use
|
||||
- mcp
|
||||
- tool_search
|
||||
|
||||
## Pricing notes
|
||||
- Cached input tokens are priced at 10% of the uncached input token rate.
|
||||
- Cache writes are billed at 1.25x the uncached input token rate.
|
||||
- Prompts with more than 272K input tokens are priced at 2x input and cache rates and 1.5x output for the full request.
|
||||
- Regional processing adds a 10% premium where available.
|
||||
- Batch and Flex are priced at 50% of Standard rates. Fast mode is priced at 2x the applicable rates.
|
||||
|
||||
Playground: https://platform.openai.com/chat/edit?models=gpt-6-sol
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
# GPT-6.1 Sol
|
||||
|
||||
- Model ID: gpt-6.1-sol
|
||||
- Model type: reasoning
|
||||
- Current snapshot: gpt-6.1-sol
|
||||
|
||||
Near-Astra performance for complex work at a lower cost.
|
||||
|
||||
Use GPT-6.1 Sol for complex coding, computer use, and professional work.
|
||||
|
||||
`reasoning.effort` supports `low`, `medium` (default), `high`, `xhigh`, and
|
||||
`max`.
|
||||
|
||||
Tool calling requires the Responses API.
|
||||
|
||||
See the [GPT-6 guide](https://developers.openai.com/api/docs/guides/latest-model?model=gpt-6-astra#gpt-61-sol)
|
||||
for prompting and migration guidance.
|
||||
|
||||
## Snapshots
|
||||
- gpt-6.1-sol
|
||||
|
||||
## Current snapshot details
|
||||
- Context window: 1,050,000 tokens
|
||||
- Max input: 922,000 tokens
|
||||
- Max output: 128,000 tokens
|
||||
- Knowledge cutoff: 2026-04-30
|
||||
- Input modalities: text, image
|
||||
- Output modalities: text
|
||||
- Supported endpoints: responses, chat_completions, batch
|
||||
- Supported features: streaming, structured_outputs, function_calling, file_search, image_input, web_search, prompt_caching
|
||||
|
||||
## Supported tools
|
||||
- web_search
|
||||
- file_search
|
||||
- image_generation
|
||||
- code_interpreter
|
||||
- hosted_shell
|
||||
- apply_patch
|
||||
- skills
|
||||
- computer_use
|
||||
- mcp
|
||||
- tool_search
|
||||
|
||||
## Pricing notes
|
||||
- Cached input tokens are priced at 5% of the uncached input token rate.
|
||||
- Cache writes are billed at 1.25x the uncached input token rate.
|
||||
- API prompts with more than 272K input tokens are priced at 2x input and cache rates and 1.5x output for the full request.
|
||||
- Fast mode prices are 2x Standard. Batch and Flex prices are 50% lower than Standard.
|
||||
- Ultrafast mode prices are 6x Standard.
|
||||
- Regional processing adds a 10% premium where available.
|
||||
- GPT-6.1 Sol uses a default context window of 500K tokens in Codex and ChatGPT Work. Usage drawn from your subscription has no long-context surcharge. See [Codex pricing](/codex/pricing).
|
||||
|
||||
Playground: https://platform.openai.com/chat/edit?models=gpt-6.1-sol
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
# GPT-6.1 Terra
|
||||
|
||||
- Model ID: gpt-6.1-terra
|
||||
- Model type: reasoning
|
||||
- Current snapshot: gpt-6.1-terra
|
||||
|
||||
A fast, efficient model for visual reasoning, precise computer use, and clear, natural writing.
|
||||
|
||||
Use GPT-6.1 Terra to match product photos to catalog entries, interpret
|
||||
technical drawings, act on application screens, or draft and revise text.
|
||||
|
||||
`reasoning.effort` supports `none`, `low`, `medium` (default), `high`,
|
||||
`xhigh`, and `max`.
|
||||
|
||||
Tool calling requires the Responses API.
|
||||
|
||||
See the [GPT-6 guide](https://developers.openai.com/api/docs/guides/latest-model?model=gpt-6-astra#gpt-61-terra)
|
||||
for prompting and migration guidance.
|
||||
|
||||
## Snapshots
|
||||
- gpt-6.1-terra
|
||||
|
||||
## Current snapshot details
|
||||
- Context window: 1,050,000 tokens
|
||||
- Max input: 922,000 tokens
|
||||
- Max output: 128,000 tokens
|
||||
- Knowledge cutoff: 2026-06-01
|
||||
- Input modalities: text, image
|
||||
- Output modalities: text
|
||||
- Supported endpoints: responses, chat_completions, batch
|
||||
- Supported features: streaming, structured_outputs, function_calling, file_search, image_input, web_search, prompt_caching
|
||||
|
||||
## Supported tools
|
||||
- web_search
|
||||
- file_search
|
||||
- image_generation
|
||||
- code_interpreter
|
||||
- hosted_shell
|
||||
- apply_patch
|
||||
- skills
|
||||
- computer_use
|
||||
- mcp
|
||||
- tool_search
|
||||
|
||||
## Pricing notes
|
||||
- Cached input tokens are priced at 5% of the uncached input token rate.
|
||||
- Cache-write prices shown use 30-minute retention. Standard cache writes cost $1.25 per million tokens for 30-minute retention and $2.50 for 12-hour retention, before long-context adjustments.
|
||||
- Prompts with more than 272K input tokens are priced at 2x input and cache rates and 1.5x output for the full request.
|
||||
- Batch and Flex prices are 50% lower than Standard.
|
||||
- Regional processing adds a 10% premium where available.
|
||||
- Fast mode prices are 2x Standard.
|
||||
|
||||
Playground: https://platform.openai.com/chat/edit?models=gpt-6.1-terra
|
||||
|
||||
Reference in New Issue
Block a user