opus_4_5_migration
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOpus 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
迁移工作流
- Search codebase for model strings and API calls
- Update model strings to Opus 4.5 (see platform-specific strings below)
- Remove unsupported beta headers
- Add effort parameter set to (see
"high")references/effort.md - Summarize all changes made
- Tell the user: "If you encounter any issues with Opus 4.5, let me know and I can help adjust your prompts."
- 搜索代码库中的模型字符串和API调用
- 将模型字符串更新为Opus 4.5(见下方平台特定字符串)
- 移除不支持的beta头
- 添加设为的effort参数(详见
"high")references/effort.md - 总结所有已做的更改
- 告知用户:“如果您在使用Opus 4.5时遇到任何问题,请告诉我,我可以帮您调整提示词。”
Model String Updates
模型字符串更新
Identify which platform the codebase uses, then replace model strings accordingly.
确定代码库使用的平台,然后相应替换模型字符串。
Unsupported Beta Headers
不支持的Beta头
Remove the beta header if present—it is not yet supported with Opus 4.5. Leave a comment noting this:
context-1m-2025-08-07python
undefined如果存在 beta头,请移除它——该头暂不支持Opus 4.5。留下如下注释:
context-1m-2025-08-07python
undefinedNote: 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
undefinedundefinedTarget Model Strings (Opus 4.5)
目标模型字符串(Opus 4.5)
| Platform | Opus 4.5 Model String |
|---|---|
| Anthropic API (1P) | |
| AWS Bedrock | |
| Google Vertex AI | |
| Azure AI Foundry | |
| 平台 | Opus 4.5 模型字符串 |
|---|---|
| Anthropic API (1P) | |
| AWS Bedrock | |
| Google Vertex AI | |
| Azure AI Foundry | |
Source Model Strings to Replace
需要替换的源模型字符串
| Source Model | Anthropic API (1P) | AWS Bedrock | Google Vertex AI |
|---|---|---|---|
| Sonnet 4.0 | | | |
| Sonnet 4.5 | | | |
| Opus 4.1 | | | |
Do NOT migrate: Any Haiku models (e.g., ).
claude-haiku-4-5-20251001| 源模型 | Anthropic API (1P) | AWS Bedrock | Google Vertex AI |
|---|---|---|---|
| Sonnet 4.0 | | | |
| Sonnet 4.5 | | | |
| Opus 4.1 | | | |
请勿迁移:任何Haiku模型(例如)。
claude-haiku-4-5-20251001Prompt 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>) to organize additions<tool_usage> - 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:
- → remove or soften
CRITICAL: - →
You MUST...You should... - →
ALWAYS do XDo X - →
NEVER skip...Don't skip... - → remove or soften
REQUIRED
Only apply to tool-triggering instructions. Leave other uses of emphasis alone.
Opus 4.5对系统提示词的响应更敏感。在之前模型中用于防止触发不足的强硬语言,现在可能会导致过度触发。
应用场景:用户报告工具被过于频繁或不必要地调用。
查找并软化以下表述:
- → 移除或软化
CRITICAL: - →
You MUST...You should... - →
ALWAYS do XDo 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.mdOpus 4.5倾向于创建额外文件、添加不必要的抽象或构建未被要求的灵活性。
应用场景:用户报告出现多余文件、过度抽象或未被要求的功能。添加中的代码片段。
references/prompt-snippets.md3. 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.mdOpus 4.5在探索代码时可能过于保守,未读取文件就直接提出解决方案。
应用场景:用户报告模型未检查相关代码就提出修复方案。添加中的代码片段。
references/prompt-snippets.md4. 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.md5. 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 parameter.
thinkingApply if: User reports issues related to "thinking" while extended thinking is not enabled (no parameter in request).
thinkingReplace "think" with alternatives like "consider," "believe," or "evaluate."
当未启用扩展思考(默认设置)时,Opus 4.5对“think”及其变体词特别敏感。仅当API请求包含参数时,才会启用扩展思考。
thinking应用场景:用户在未启用扩展思考时(请求中无参数),报告与“思考”相关的问题。
thinking将“think”替换为“consider”、“believe”或“evaluate”等替代词。
Reference
参考
See for the full text of each snippet to add.
references/prompt-snippets.mdOpus 4.5 Migration v1.1 - Enhanced
完整的待添加代码片段文本,请见。
references/prompt-snippets.mdOpus 4.5 迁移 v1.1 - 增强版
🔄 Workflow
🔄 工作流
Aşama 1: Discovery
步骤1:发现阶段
- Audit: Codebase'deki tüm model string'lerini (,
claude-3-opus) listele.claude-3-5-sonnet - 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 (veya güncel ID) ile değiştir.
claude-3-5-opus-20241022 - 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替换为(或最新ID)。
claude-3-5-opus-20241022 - 参数检查:检查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şama | Doğrulama |
|---|---|
| 1 | Yeni modelin "refusal" (reddetme) oranı arttı mı? |
| 2 | JSON formatındaki çıktılar hala valid mi? |
| 3 | Maliyet artışı (varsa) performans artışına değiyor mu? |
| 步骤 | 验证内容 |
|---|---|
| 1 | 新模型的“拒绝(refusal)”率是否上升? |
| 2 | JSON格式的输出是否仍然有效? |
| 3 | 成本增加(若有)是否匹配性能提升? |