← 提示词库 Anthropic/claude-code/skills/claude-api/shared/models.md 原文 md
🌐 中英双语对照

Claude Model Catalog / Claude 模型目录

Only use exact model IDs listed in this file. Never guess or construct model IDs - incorrect IDs will cause API errors. Use aliases wherever available. For the latest information, WebFetch the Models Overview URL in shared/live-sources.md, or query the Models API directly (see Programmatic Model Discovery below).

只使用本文件中列出的精确模型 ID。 绝不猜测或拼造模型 ID——错误的 ID 会导致 API 错误。凡是可用别名之处都使用别名。要获取最新信息,用 WebFetch 抓取 shared/live-sources.md 中的 Models Overview URL,或直接查询 Models API(见下文的 Programmatic Model Discovery 程序化模型发现)。

【评论】首段以强制口吻限定模型只能使用清单内的 ID,是针对模型幻觉式拼造模型名的防护设计。

Programmatic Model Discovery / 程序化模型发现

For live capability data - context window, max output tokens, feature support (thinking, vision, effort, structured outputs, etc.) - query the Models API instead of relying on the cached tables below. Use this when the user asks "what's the context window for X", "does model X support vision/thinking/effort", "which models support feature Y", or wants to select a model by capability at runtime.

要获取实时能力数据——上下文窗口、最大输出 token、功能支持(思考、视觉、effort、结构化输出等)——请查询 Models API,而不要依赖下方缓存表格。当用户询问"X 的上下文窗口是多少"、"模型 X 是否支持视觉/思考/effort"、"哪些模型支持功能 Y",或想在运行时按能力选择模型时,使用此方法。

m = client.models.retrieve("claude-opus-4-8")
m.id                 # "claude-opus-4-8"
m.display_name       # "Claude Opus 4.8"
m.max_input_tokens   # context window (int)
m.max_tokens         # max output tokens (int)

# capabilities is an untyped nested dict - bracket access, check ["supported"] at the leaf
caps = m.capabilities
caps["image_input"]["supported"]                       # vision
caps["thinking"]["types"]["adaptive"]["supported"]     # adaptive thinking
caps["effort"]["max"]["supported"]                     # effort: max (also low/medium/high)
caps["structured_outputs"]["supported"]
caps["context_management"]["compact_20260112"]["supported"]

# filter across all models - iterate the page object directly (auto-paginates); do NOT use .data
[m for m in client.models.list()
 if m.capabilities["thinking"]["types"]["adaptive"]["supported"]
 and m.max_input_tokens >= 200_000]

Top-level fields (id, display_name, max_input_tokens, max_tokens) are typed attributes. capabilities is a dict - use bracket access, not attribute access. The API returns the full capability tree for every model with supported: true/false at each leaf, so bracket chains are safe without .get() guards. TypeScript SDK: same method names, also auto-paginates on iteration.

顶层字段(id、display_name、max_input_tokens、max_tokens)是带类型的属性。capabilities 是一个 dict——使用方括号访问,而不是属性访问。API 为每个模型返回完整的能力树,每个叶子节点都有 supported: true/false,因此方括号链不需要 .get() 防护也是安全的。TypeScript SDK:方法名相同,迭代时同样自动分页。

Raw HTTP / 原生 HTTP

curl https://api.anthropic.com/v1/models/claude-opus-4-8 \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01"
{
  "id": "claude-opus-4-8",
  "display_name": "Claude Opus 4.8",
  "max_input_tokens": 1000000,
  "max_tokens": 128000,
  "capabilities": {
    "image_input": {"supported": true},
    "structured_outputs": {"supported": true},
    "thinking": {"supported": true, "types": {"enabled": {"supported": false}, "adaptive": {"supported": true}}},
    "effort": {"supported": true, "low": {"supported": true}, ..., "max": {"supported": true}},
    ...
  }
}

Current Models (recommended) / 当前模型(推荐)

Friendly Name Alias (use this) Full ID Context Max Output Status
Claude Fable 5.1 claude-fable-5-1 - 1M 128K Active
Claude Mythos 5.1 claude-mythos-5-1 - 1M 128K Active (Project Glasswing only)
Claude Fable 5 claude-fable-5 - 1M 128K Active
Claude Mythos 5 claude-mythos-5 - 1M 128K Active (Project Glasswing only)
Claude Opus 5.5 claude-opus-5-5 - 1M 128K Active
Claude Opus 5 claude-opus-5 - 1M 128K Active
Claude Opus 4.8 claude-opus-4-8 - 1M 128K Active
Claude Opus 4.7 claude-opus-4-7 - 1M 128K Active
Claude Opus 4.6 claude-opus-4-6 - 1M 128K Active
Claude Sonnet 5.5 claude-sonnet-5-5 - 1M 128K Active
Claude Sonnet 5 claude-sonnet-5 - 1M 128K Active
Claude Sonnet 4.6 claude-sonnet-4-6 - 1M 128K Active
Claude Haiku 4.5 claude-haiku-4-5 claude-haiku-4-5-20251001 200K 64K Active
友好名称 别名(使用此别名) 完整 ID 上下文 最大输出 状态
Claude Fable 5.1 claude-fable-5-1 - 1M 128K 活跃
Claude Mythos 5.1 claude-mythos-5-1 - 1M 128K 活跃(仅限 Project Glasswing)
Claude Fable 5 claude-fable-5 - 1M 128K 活跃
Claude Mythos 5 claude-mythos-5 - 1M 128K 活跃(仅限 Project Glasswing)
Claude Opus 5.5 claude-opus-5-5 - 1M 128K 活跃
Claude Opus 5 claude-opus-5 - 1M 128K 活跃
Claude Opus 4.8 claude-opus-4-8 - 1M 128K 活跃
Claude Opus 4.7 claude-opus-4-7 - 1M 128K 活跃
Claude Opus 4.6 claude-opus-4-6 - 1M 128K 活跃
Claude Sonnet 5.5 claude-sonnet-5-5 - 1M 128K 活跃
Claude Sonnet 5 claude-sonnet-5 - 1M 128K 活跃
Claude Sonnet 4.6 claude-sonnet-4-6 - 1M 128K 活跃
Claude Haiku 4.5 claude-haiku-4-5 claude-haiku-4-5-20251001 200K 64K 活跃

Model Descriptions / 模型描述

Legacy Models (still active) / 旧模型(仍然活跃)

Friendly Name Alias (use this) Full ID Status
Claude Opus 4.5 claude-opus-4-5 claude-opus-4-5-20251101 Active
Claude Opus 4.1 claude-opus-4-1 claude-opus-4-1-20250805 Deprecated (retires 2026-08-05 - migrate to claude-opus-5-5)
Claude Sonnet 4.5 claude-sonnet-4-5 claude-sonnet-4-5-20250929 Active
友好名称 别名(使用此别名) 完整 ID 状态
Claude Opus 4.5 claude-opus-4-5 claude-opus-4-5-20251101 活跃
Claude Opus 4.1 claude-opus-4-1 claude-opus-4-1-20250805 已弃用(2026-08-05 退役——迁移到 claude-opus-5-5)
Claude Sonnet 4.5 claude-sonnet-4-5 claude-sonnet-4-5-20250929 活跃

Deprecated Models (retiring soon) / 已弃用模型(即将退役)

Friendly Name Alias (use this) Full ID Status Retires
Claude Sonnet 4 claude-sonnet-4-0 claude-sonnet-4-20250514 Deprecated TBD
Claude Opus 4 claude-opus-4-0 claude-opus-4-20250514 Deprecated TBD
Claude Haiku 3 - claude-3-haiku-20240307 Deprecated Apr 19, 2026
友好名称 别名(使用此别名) 完整 ID 状态 退役时间
Claude Sonnet 4 claude-sonnet-4-0 claude-sonnet-4-20250514 已弃用 待定
Claude Opus 4 claude-opus-4-0 claude-opus-4-20250514 已弃用 待定
Claude Haiku 3 - claude-3-haiku-20240307 已弃用 2026 年 4 月 19 日

Retired Models (no longer available) / 已退役模型(不再可用)

Friendly Name Full ID Retired
Claude Sonnet 3.7 claude-3-7-sonnet-20250219 Feb 19, 2026
Claude Haiku 3.5 claude-3-5-haiku-20241022 Feb 19, 2026
Claude Opus 3 claude-3-opus-20240229 Jan 5, 2026
Claude Sonnet 3.5 claude-3-5-sonnet-20241022 Oct 28, 2025
Claude Sonnet 3.5 claude-3-5-sonnet-20240620 Oct 28, 2025
Claude Sonnet 3 claude-3-sonnet-20240229 Jul 21, 2025
Claude 2.1 claude-2.1 Jul 21, 2025
Claude 2.0 claude-2.0 Jul 21, 2025
友好名称 完整 ID 退役时间
Claude Sonnet 3.7 claude-3-7-sonnet-20250219 2026 年 2 月 19 日
Claude Haiku 3.5 claude-3-5-haiku-20241022 2026 年 2 月 19 日
Claude Opus 3 claude-3-opus-20240229 2026 年 1 月 5 日
Claude Sonnet 3.5 claude-3-5-sonnet-20241022 2025 年 10 月 28 日
Claude Sonnet 3.5 claude-3-5-sonnet-20240620 2025 年 10 月 28 日
Claude Sonnet 3 claude-3-sonnet-20240229 2025 年 7 月 21 日
Claude 2.1 claude-2.1 2025 年 7 月 21 日
Claude 2.0 claude-2.0 2025 年 7 月 21 日

Resolving User Requests / 解析用户请求

When a user asks for a model by name, use this table to find the correct model ID:

当用户按名称要求某个模型时,使用此表找到正确的模型 ID:

User says... Use this model ID
"fable", "most capable model" claude-fable-5-1
"most powerful" claude-fable-5-1
"mythos", "mythos 5.1" claude-mythos-5-1 (Project Glasswing participants only; otherwise use claude-fable-5-1)
"fable 5", "mythos 5" (previous version) claude-fable-5 / claude-mythos-5 (still served; prefer claude-fable-5-1 for new work)
"mythos preview" claude-mythos-5-1 (successor to claude-mythos-preview - see migration guide)
"opus" claude-opus-5-5
"opus 5" claude-opus-5
"opus 5.5" claude-opus-5-5
"opus 4.8" claude-opus-4-8
"opus 4.7" claude-opus-4-7
"opus 4.6" claude-opus-4-6
"opus 4.5" claude-opus-4-5
"opus 4.1" claude-opus-4-1 (deprecated, retires 2026-08-05 - suggest claude-opus-5-5)
"opus 4", "opus 4.0" claude-opus-4-0 (deprecated - suggest claude-opus-5-5)
"sonnet", "balanced" claude-sonnet-5-5
"sonnet 5" claude-sonnet-5
"sonnet 5.5" claude-sonnet-5-5
"cheapest sonnet", "newest sonnet", "latest sonnet" (any attribute phrasing) claude-sonnet-5-5
"sonnet 4.6" claude-sonnet-4-6
"sonnet 4.5" claude-sonnet-4-5
"sonnet 4", "sonnet 4.0" claude-sonnet-4-0 (deprecated - suggest claude-sonnet-5-5)
"sonnet 3.7" Retired - suggest claude-sonnet-5-5
"sonnet 3.5" Retired - suggest claude-sonnet-5-5
"haiku", "fast", "cheap" claude-haiku-4-5
"haiku 4.5" claude-haiku-4-5
"haiku 3.5" Retired - suggest claude-haiku-4-5
"haiku 3" Deprecated - suggest claude-haiku-4-5
用户说…… 使用此模型 ID
"fable"、"最有能力的模型" claude-fable-5-1
"最强大" claude-fable-5-1
"mythos"、"mythos 5.1" claude-mythos-5-1(仅限 Project Glasswing 参与者;否则使用 claude-fable-5-1)
"fable 5"、"mythos 5"(上一个版本) claude-fable-5 / claude-mythos-5(仍在服务;新工作优先使用 claude-fable-5-1)
"mythos preview" claude-mythos-5-1(claude-mythos-preview 的后继者——见迁移指南)
"opus" claude-opus-5-5
"opus 5" claude-opus-5
"opus 5.5" claude-opus-5-5
"opus 4.8" claude-opus-4-8
"opus 4.7" claude-opus-4-7
"opus 4.6" claude-opus-4-6
"opus 4.5" claude-opus-4-5
"opus 4.1" claude-opus-4-1(已弃用,2026-08-05 退役——建议 claude-opus-5-5)
"opus 4"、"opus 4.0" claude-opus-4-0(已弃用——建议 claude-opus-5-5)
"sonnet"、"均衡" claude-sonnet-5-5
"sonnet 5" claude-sonnet-5
"sonnet 5.5" claude-sonnet-5-5
"最便宜的 sonnet"、"最新的 sonnet"(任何按属性描述的说法) claude-sonnet-5-5
"sonnet 4.6" claude-sonnet-4-6
"sonnet 4.5" claude-sonnet-4-5
"sonnet 4"、"sonnet 4.0" claude-sonnet-4-0(已弃用——建议 claude-sonnet-5-5)
"sonnet 3.7" 已退役——建议 claude-sonnet-5-5
"sonnet 3.5" 已退役——建议 claude-sonnet-5-5
"haiku"、"快"、"便宜" claude-haiku-4-5
"haiku 4.5" claude-haiku-4-5
"haiku 3.5" 已退役——建议 claude-haiku-4-5
"haiku 3" 已弃用——建议 claude-haiku-4-5