### 分析摘要
本批次文档更新主要集中在**多语言 SDK 代码示例的标准化与健壮性提升**,同时针对**云平台(AWS、Google Cloud)的特定行为**和**Claude Code 的模型弃用**进行了关键澄清。
### 核心主题
* **代码示例质量重构**:大幅更新了 Java、PHP、Ruby、Go、TypeScript 等语言的代码片段。主要改进包括:添加标准的 `main()` 函数结构、引入更严格的错误处理(如 PHP 的异常抛出)、修复导入语句、使用模型常量替代魔法字符串(如 `Model::CLAUDE_OPUS_5_5`),以及修正 Java 的输出方法为 `IO.println`。
* **云平台差异化说明**:为 Claude Platform on AWS 和 Google Cloud (Anthropic managed) 增加了关于速率限制层(显示为 "Custom tier")和申请流程的专门说明;明确了 Google Cloud 和 Microsoft Foundry 的 SDK 客户端初始化方式。
* **配置与权限行为澄清**:
* **MCP**:细化了工具设置为 `ask` 时的提示行为(明确是在 Claude 每次调用时提示)。
* **终端通知**:更新了通过 SSH 在 Ghostty/Kitty/iTerm2 上接收通知的配置建议,推荐在 v2.1.326+ 版本使用默认的 `"auto"` 设置。
* **模型弃用与迁移**:新增了 Claude Code 模型弃用的具体迁移指导,指出 `claude-sonnet-4-5` 的退役包含带日期和不带日期的 ID。
### 影响等级:**低**
**理由**:尽管涉及 16 个页面的修改,但绝大多数属于文档完善和代码示例优化,未引入任何破坏性的 API 变更或协议修改。少数功能性更新(如速率限制申请按钮、终端通知配置)主要是对现有流程的澄清或对旧版本的兼容性说明。
### 开发者行动项
1. **审查终端配置**:如果您通过 SSH 在旧版 Claude Code 中使用 Ghostty、Kitty 或 iTerm2,建议将 `preferredNotifChannel` 改为默认的 `"auto"` 以确保通知正确转发。
2. **规划模型迁移**:如果 Claude Code 配置了 `claude-sonnet-4-5`,请按照文档更新至推荐的替代模型,并检查所有子代理定义。
3. **更新 AWS 限额申请流程**:若在 AWS 平台上申请更高的速率限制,请使用新的 **"Request higher limits"** 按钮,并确保 IAM 角色拥有相应的操作权限。
4. **检查 Structured Outputs 用法**:如果您在结构化输出中使用了 `oneOf`、`not` 或特定的复杂 `anyOf` 组合,请注意这些目前不被支持,需改用 `anyOf` 等替代方案。
💭 Model Reasoning
1. **Understand the Goal:** The user wants a concise, insightful analysis of documentation changes in markdown format, focusing on what matters to developers. I need to analyze the provided diffs from 16 pages.
2. **Analyze the Diffs (Page by Page):**
* **mcp.md**:
* *Changes*: Clarified behavior of tools set to `ask` (prompts on *every call Claude makes*). Changed description of `requiresUserInteraction` (removed "on every call", clarified `dontAsk` mode behavior). Changed sentence structure slightly for clarity (e.g., "marks one tool" -> "marks one tool:").
* *Theme*: Clarification of MCP tool permission behaviors (`ask` mode and `_meta` flag).
* **terminal-config.md**:
* *Changes*: Updated instructions for notification channel preference over SSH. Changed from explicit settings to `preferredNotifChannel` default `"auto"` for Ghostty, Kitty, iTerm2, noting version requirements (before v2.1.326).
* *Theme*: Configuration changes/refinements for terminal notifications (SSH/tmux).
* **about-claude/model-deprecations.md**:
* *Changes*: Added note that Claude Code uses Claude API and deprecation dates apply. Added specific migration instructions for Claude Code (update version, check model, replace deprecated ones, update subagents). Added note about `claude-sonnet-4-5` retirement including the ID without a date.
* *Theme*: Model deprecations specifically regarding Claude Code usage and migration paths.
* **api/rate-limits.md**:
* *Changes*: Updated notes for Claude Platform on AWS (tiering behavior). Clarified that Custom tier shows as "Custom tier" on Google Cloud/AWS. Updated instructions for requesting higher limits on AWS (button name "Request higher limits", IAM actions needed).
* *Theme*: Clarifications on rate limit tiers and request processes, specifically for partner platforms (AWS, Google Cloud).
* **build-with-claude/vision.md**:
* *Changes*: Code examples updated (cURL now downloads image first, TypeScript data change, C# namespace removal, Java code structure, PHP error handling). Changed description text ("vision-example.jpg" references). Removed duplicate imports.
* *Theme*: Code example improvements (error handling, structure, correctness) across multiple languages.
* **build-with-claude/pdf-support.md**:
* *Changes*: Structural changes to "Send your first PDF request". Updated code examples (Java, PHP, Ruby) for better error handling and structure (e.g., `IO.println`, `Model::CLAUDE_OPUS_5_5`). Clarified text block descriptions.
* *Theme*: Code example improvements and clearer instructions on how to provide PDFs.
* **build-with-claude/citations.md**:
* *Changes*: Updated code examples (Java `IO.println`, PHP `mediaType` correction). Rewrote "How citations work" section for clarity (stages). Updated Structured Outputs warning text.
* *Theme*: Code example consistency and clarification of the citation mechanism.
* **build-with-claude/structured-outputs.md**:
* *Changes*: Updated list of supported (`$defs`) and not supported features (added `oneOf`, `not`, complex `anyOf`/`allOf` combinations).
* *Theme*: Updated feature support list for Structured Outputs schemas.
* **build-with-claude/files.md**:
* *Changes*: Updated code examples (TypeScript import, Java, PHP error handling, Ruby `is_a?` check). Changed cURL example for text files to use `jq` for safe encoding. Updated text description.
* *Theme*: Code example quality improvements (safety, error handling).
* **build-with-claude/claude-on-vertex-ai.md**:
* *Changes*: Description update. Code examples updated (Go, PHP, Ruby) - added `main()` functions, improved imports, fixed Client instantiation paths. Clarified SDK handling of model/version.
* *Theme*: Code example standardization and bug fixes for Google Cloud integration.
* **build-with-claude/claude-in-microsoft-foundry.md**:
* *Changes*: Installation instructions updated (Gemfile -> bundle add). Code examples updated (Ruby `grep`). Added note about Azure CLI for Entra ID.
* *Theme*: Code example updates and dependency installation instructions.
* **agents-and-tools/tool-use/implement-tool-use.md**:
* *Changes*: Clarified "Requirements and limitations" (schema validation, supported tools). Updated diagram description.
* *Theme*: Clarification of tool input examples and `tool_choice` behavior.
* **agents-and-tools/tool-use/text-editor-tool.md**:
* *Changes*: Minor code formatting (`// ...` indentation).
* *Theme*: Code formatting fix.
* **agents-and-tools/tool-use/computer-use-tool.md**:
* *Changes*: Minor code formatting (`// ...` indentation).
* *Theme*: Code formatting fix.
* **agents-and-tools/mcp-connector.md**:
* *Changes*: Minor code formatting (`// ...` indentation).
* *Theme*: Code formatting fix.
* **test-and-evaluate/develop-tests.md**:
* *Changes*: Minor code formatting (`// ...` indentation).
* *Theme*: Code formatting fix.
3. **Synthesize Key Themes:**
* **Code Example Refinement**: A massive portion of the changes involves cleaning up code examples across multiple languages (Java, PHP, Ruby, Go, C#, TypeScript). This includes adding proper `main()` functions, improving error handling (e.g., `throw new \RuntimeException`), fixing imports (using constants like `Model::CLAUDE_OPUS_5_5` instead of magic strings), and standardizing output methods (`IO.println`).
* **Platform-Specific Clarifications**: Several pages (Rate limits, Model deprecations, Google Cloud, AWS, Microsoft Foundry) received updates clarifying how features behave specifically on partner platforms or managed services.
* **Configuration & Permissions**: Updates to how terminal notifications are configured over SSH and how MCP tool permissions (`ask` mode) function.
4. **Determine Impact Level:**
* **Breaking**: No.
* **High**: No major feature changes or removals that break existing code immediately.
* **Medium**: The code example changes are significant in volume but mostly improve copy-paste reliability. The rate limit/AWS changes might affect operational processes for AWS users.
* **Low**: The bulk is documentation improvements, clarifications, and non-breaking code style updates.
* *Decision*: **Low**. The changes are primarily about documentation accuracy, code example quality, and operational clarifications rather than fundamental API shifts.
5. **Formulate Action Items:**
* Check terminal notification settings if using SSH/tmux in older versions.
* Review model deprecations if using Claude Code or `claude-sonnet-4-5`.
* Review Structured Outputs schema usage if using `oneOf`, `not`, or complex `anyOf` logic.
* Update AWS rate limit request processes (use the new button/IAM actions).
6. **Draft the Response (Iterative refinement for conciseness):**
* *Summary*: Batch of documentation improvements focusing on code example standardization across languages, clarifications for partner platforms (AWS, Google Cloud), and refinements to Claude Code and MCP configuration behaviors.
* *Themes*:
* **Code Quality**: Extensive updates to SDK examples (Java, PHP, Ruby, Go) adding error handling, `main()` functions, and fixing imports/outputs.
* **Platform Nuances**: Specific guidance added for Claude Platform on AWS, Google Cloud, and Microsoft Foundry regarding rate limits, authentication, and deprecations.
* **Feature Clarifications**: Refined docs for MCP permissions, terminal notifications (SSH), and Structured Outputs schema support.
* *Impact*: **Low**. Changes are informational and improve code reliability but introduce no breaking API changes.
* *Actions*:
* Verify your terminal notification config if you use SSH with Ghostty/Kitty/iTerm2.
* Update deprecation plans for `claude-sonnet-4-5` in Claude Code.
* Adjust AWS rate limit request workflows (new button/IAM actions).
* Check Structured Outputs schemas for `oneOf` or complex `anyOf` usage.
7. **Final Review against User Prompt:**
* "Single batch": Yes.
* "Summarize what changed and why": Yes.
* "Focus on what matters to developers": Yes (code examples, config, limits).
* "Concise, insightful": Yes.
* "Markdown format": Yes.
* "Chinese": Yes.
8. **Translate to Chinese and Polish:**
* *Summary*: 本批次文档更新主要集中在 SDK 代码示例的标准化、云平台特定功能的说明澄清,以及 Claude Code 和终端配置的微调。
* *Themes*:
* 代码质量提升(Java, PHP, Ruby 等错误处理和结构修复)。
* 多平台支持细节(AWS, Google Cloud, Microsoft Foundry 的速率限制和认证说明)。
* 功能行为澄清(MCP 权限、SSH 通知、结构化输出 schema 支持范围)。
* *Impact*: **Low**。无破坏性变更,主要是文档完善和代码示例优化。
* *Actions*:
* 检查 SSH 下的终端通知配置。
* 规划 `claude-sonnet-4-5` 模型迁移。
* 更新 AWS 速率限制申请流程。
* 审查结构化输出中 `oneOf` 的使用。
(Self-correction: Ensure the distinction between the code formatting changes and the content changes is clear. The volume of code changes is high, but impact is low because it's just docs.)
9. **Final Output Generation** (Proceed to generate output based on the synthesized points).