claude-opus-4-5-migration

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Opus 4.5 Migration Guide

Opus 4.5 迁移指南

One-shot migration from Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5.
从Sonnet 4.0、Sonnet 4.5或Opus 4.1一键迁移至Opus 4.5。

Migration Workflow

迁移流程

  1. Search codebase for model strings and API calls
  2. Update model strings to Opus 4.5 (see platform-specific strings below)
  3. Remove unsupported beta headers
  4. Add effort parameter set to
    "high"
    (see
    references/effort.md
    )
  5. Summarize all changes made
  6. Tell the user: "If you encounter any issues with Opus 4.5, let me know and I can help adjust your prompts."
  1. 在代码库中搜索模型字符串和API调用
  2. 将模型字符串更新为Opus 4.5(见下方各平台专属字符串)
  3. 移除不受支持的Beta标头
  4. 添加设置为
    "high"
    的effort参数(详见
    references/effort.md
  5. 总结所有已做更改
  6. 告知用户:“如果您在使用Opus 4.5时遇到任何问题,请告诉我,我可以帮您调整提示词。”

Model String Updates

模型字符串更新

Identify which platform the codebase uses, then replace model strings accordingly.
确定代码库使用的平台,然后相应替换模型字符串。

Unsupported Beta Headers

不受支持的Beta标头

Remove the
context-1m-2025-08-07
beta header if present—it is not yet supported with Opus 4.5. Leave a comment noting this:
python
undefined
如果存在
context-1m-2025-08-07
Beta标头,请将其移除——该标头目前尚未在Opus 4.5中得到支持。留下如下注释:
python
undefined

Note: 1M context beta (context-1m-2025-08-07) not yet supported with Opus 4.5

Note: 1M context beta (context-1m-2025-08-07) not yet supported with Opus 4.5

undefined
undefined

Target Model Strings (Opus 4.5)

目标模型字符串(Opus 4.5)

PlatformOpus 4.5 Model String
Anthropic API (1P)
claude-opus-4-5-20251101
AWS Bedrock
anthropic.claude-opus-4-5-20251101-v1:0
Google Vertex AI
claude-opus-4-5@20251101
Azure AI Foundry
claude-opus-4-5-20251101
平台Opus 4.5 模型字符串
Anthropic API (1P)
claude-opus-4-5-20251101
AWS Bedrock
anthropic.claude-opus-4-5-20251101-v1:0
Google Vertex AI
claude-opus-4-5@20251101
Azure AI Foundry
claude-opus-4-5-20251101

Source Model Strings to Replace

需替换的源模型字符串

Source ModelAnthropic API (1P)AWS BedrockGoogle Vertex AI
Sonnet 4.0
claude-sonnet-4-20250514
anthropic.claude-sonnet-4-20250514-v1:0
claude-sonnet-4@20250514
Sonnet 4.5
claude-sonnet-4-5-20250929
anthropic.claude-sonnet-4-5-20250929-v1:0
claude-sonnet-4-5@20250929
Opus 4.1
claude-opus-4-1-20250422
anthropic.claude-opus-4-1-20250422-v1:0
claude-opus-4-1@20250422
Do NOT migrate: Any Haiku models (e.g.,
claude-haiku-4-5-20251001
).
源模型Anthropic API (1P)AWS BedrockGoogle Vertex AI
Sonnet 4.0
claude-sonnet-4-20250514
anthropic.claude-sonnet-4-20250514-v1:0
claude-sonnet-4@20250514
Sonnet 4.5
claude-sonnet-4-5-20250929
anthropic.claude-sonnet-4-5-20250929-v1:0
claude-sonnet-4-5@20250929
Opus 4.1
claude-opus-4-1-20250422
anthropic.claude-opus-4-1-20250422-v1:0
claude-opus-4-1@20250422
请勿迁移:任何Haiku模型(例如
claude-haiku-4-5-20251001
)。

Prompt Adjustments

提示词调整

Opus 4.5 has known behavioral differences from previous models. Only apply these fixes if the user explicitly requests them or reports a specific issue. By default, just update model strings.
Integration guidelines: When adding snippets, don't just append them to prompts. Integrate them thoughtfully:
  • Use XML tags (e.g.,
    <code_guidelines>
    ,
    <tool_usage>
    ) to organize additions
  • Match the style and structure of the existing prompt
  • Place snippets in logical locations (e.g., coding guidelines near other coding instructions)
  • If the prompt already uses XML tags, add new content within appropriate existing tags or create consistent new ones
Opus 4.5与旧版本模型存在已知的行为差异。仅当用户明确要求或报告特定问题时,才应用这些修复措施。默认情况下,只需更新模型字符串即可。
集成指南:添加代码片段时,不要直接将其附加到提示词末尾。请谨慎集成:
  • 使用XML标签(例如
    <code_guidelines>
    <tool_usage>
    )来组织新增内容
  • 匹配现有提示词的风格和结构
  • 将片段放置在逻辑位置(例如,编码指南放在其他编码说明附近)
  • 如果提示词已使用XML标签,请将新内容添加到适当的现有标签中,或创建一致的新标签

1. Tool Overtriggering

1. 工具过度触发

Opus 4.5 is more responsive to system prompts. Aggressive language that prevented undertriggering on previous models may now cause overtriggering.
Apply if: User reports tools being called too frequently or unnecessarily.
Find and soften:
  • CRITICAL:
    → remove or soften
  • You MUST...
    You should...
  • ALWAYS do X
    Do X
  • NEVER skip...
    Don't skip...
  • REQUIRED
    → remove or soften
Only apply to tool-triggering instructions. Leave other uses of emphasis alone.
Opus 4.5对系统提示词的响应更敏感。在旧版本模型中用于防止触发不足的强硬表述,现在可能会导致过度触发。
适用场景:用户报告工具被过于频繁或不必要地调用。
查找并软化表述
  • CRITICAL:
    → 移除或软化
  • You MUST...
    You should...
  • ALWAYS do X
    Do X
  • NEVER skip...
    Don't skip...
  • REQUIRED
    → 移除或软化
仅对工具触发指令应用上述调整。其他强调性表述保持不变。

2. Over-Engineering Prevention

2. 过度设计预防

Opus 4.5 tends to create extra files, add unnecessary abstractions, or build unrequested flexibility.
Apply if: User reports unwanted files, excessive abstraction, or unrequested features. Add the snippet from
references/prompt-snippets.md
.
Opus 4.5倾向于创建额外文件、添加不必要的抽象层,或构建未被要求的灵活性。
适用场景:用户报告出现多余文件、过度抽象或未被要求的功能。添加
references/prompt-snippets.md
中的代码片段。

3. Code Exploration

3. 代码探索

Opus 4.5 can be overly conservative about exploring code, proposing solutions without reading files.
Apply if: User reports the model proposing fixes without inspecting relevant code. Add the snippet from
references/prompt-snippets.md
.
Opus 4.5在探索代码方面可能过于保守,未读取文件就直接提出解决方案。
适用场景:用户报告模型未检查相关代码就提出修复方案。添加
references/prompt-snippets.md
中的代码片段。

4. Frontend Design

4. 前端设计

Apply if: User requests improved frontend design quality or reports generic-looking outputs.
Add the frontend aesthetics snippet from
references/prompt-snippets.md
.
适用场景:用户要求提升前端设计质量,或报告输出内容外观通用化。
添加
references/prompt-snippets.md
中的前端美学代码片段。

5. Thinking Sensitivity

5. 思考表述敏感性

When extended thinking is not enabled (the default), Opus 4.5 is particularly sensitive to the word "think" and its variants. Extended thinking is enabled only if the API request contains a
thinking
parameter.
Apply if: User reports issues related to "thinking" while extended thinking is not enabled (no
thinking
parameter in request).
Replace "think" with alternatives like "consider," "believe," or "evaluate."
当未启用扩展思考(默认设置)时,Opus 4.5对“think”及其变体词汇特别敏感。仅当API请求中包含
thinking
参数时,扩展思考才会被启用。
适用场景:用户在未启用扩展思考(请求中无
thinking
参数)时,报告与“思考”相关的问题。
将“think”替换为“consider”、“believe”或“evaluate”等替代词汇。

Reference

参考资料

See
references/prompt-snippets.md
for the full text of each snippet to add.
See
references/effort.md
for configuring the effort parameter (only if user requests it).
如需查看所有待添加片段的完整文本,请参阅
references/prompt-snippets.md
如需了解effort参数的配置方法(仅当用户要求时),请参阅
references/effort.md