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.
Opus 4.5 Migration v1.1 - Enhanced
完整的待添加代码片段文本,请见
references/prompt-snippets.md
Opus 4.5 迁移 v1.1 - 增强版

🔄 Workflow

🔄 工作流

Aşama 1: Discovery

步骤1:发现阶段

  • Audit: Codebase'deki tüm model string'lerini (
    claude-3-opus
    ,
    claude-3-5-sonnet
    ) listele.
  • Test Cases: Migration öncesi modelin başarısını ölçen "Golden Prompt" setini çalıştır (Baseline).
  • 审计:列出代码库中的所有模型字符串(例如
    claude-3-opus
    claude-3-5-sonnet
    )。
  • 测试用例:运行用于衡量迁移前模型性能的“Golden Prompt”集合(基准测试)。

Aşama 2: Update & Refinement

步骤2:更新与优化

  • String Replacement: Model ID'lerini
    claude-3-5-opus-20241022
    (veya güncel ID) ile değiştir.
  • Parameter Check: Temperature ve Max Tokens değerlerini kontrol et (yeni model daha verbose veya daha creative olabilir).
  • System Prompt: Yeni modelin talimatları anlama hassasiyeti değişmiş olabilir; sistemi sadeleştir.
  • 字符串替换:将模型ID替换为
    claude-3-5-opus-20241022
    (或最新ID)。
  • 参数检查:检查Temperature和Max Tokens的值(新模型可能更冗长或更具创造性)。
  • 系统提示词:新模型对指令的理解敏感度可能已变化;请简化系统提示词。

Aşama 3: Validation

步骤3:验证

  • Regression Test: Golden Prompt setini tekrar çalıştır ve çıktıları karşılaştır.
  • Cost Analysis: Token kullanımındaki değişimi (daha az/çok token üretiyor mu?) analiz et.
  • Latency Check: Response süresindeki değişimi ölç.
  • 回归测试:重新运行Golden Prompt集合并比较输出结果。
  • 成本分析:分析Token使用量的变化(是否生成了更多/更少的Token?)。
  • 延迟检查:测量响应时间的变化。

Kontrol Noktaları

检查点

AşamaDoğrulama
1Yeni modelin "refusal" (reddetme) oranı arttı mı?
2JSON formatındaki çıktılar hala valid mi?
3Maliyet artışı (varsa) performans artışına değiyor mu?
步骤验证内容
1新模型的“拒绝(refusal)”率是否上升?
2JSON格式的输出是否仍然有效?
3成本增加(若有)是否匹配性能提升?