# 文档变更分析
### 总体摘要
此次更新主要简化了文档结构,重构了定价与速率限制模型(从旧的 Tier 1-4 体系改为 Start/Build/Scale),修正了代码示例中的关键错误(特别是 PDF 处理时的 HTTP 重定向跟随),并大幅扩展了 Citations 功能的多语言 SDK 支持示例。
### 关键主题
* **文档结构简化**:在 `devcontainer.md`、`llm-gateway.md`、`sandboxing.md` 等多个页面移除了冗余的 "This page covers..." 目录列表,改用更紧凑的内联摘要,提升了阅读流畅度。
* **定价与层级模型重组**:在 `api/rate-limits.md` 和 `about-claude/pricing.md` 中,将旧的 `Tier 1-4` 命名法统一重命名为 `Start`、`Build`、`Scale`,移除了复杂的信用购买阈值表格,简化了月度费用上限的描述逻辑。
* **代码示例修正与健壮性提升**:在 `build-with-claude/pdf-support.md` 中,修复了多个代码示例(cURL, Python, Java)未跟随 HTTP 重定向的潜在 bug(添加了 `-L` 或 `follow_redirects=True`),并更新了 Java SDK 的文件上传方式为 `MultipartField`。
* **SDK 支持范围扩展**:在 `build-with-claude/citations.md` 中,新增了 TypeScript、C#、Go、PHP 和 Ruby 的完整代码示例,填补了此前仅 Python/Java 的空白。
* **概念阐述优化**:在 `agents-and-tools/tool-use/overview.md` 中,增加了 "When Claude uses tools" 章节,更清晰地解释了工具调用的触发逻辑和提示词策略。
### 影响等级:**中等**
**理由**:
尽管大部分变更为文档格式清理,对现有代码运行无影响,但**定价层级的重命名**会影响团队内部的沟通及财务规划文档;更重要的是,**PDF 处理代码示例的修复**解决了实际网络环境中的常见失败场景,属于质量关键修正。
### 开发者行动项
* **更新内部文档**:将技术选型或内部知识库中的 API 层级称呼从 "Tier 1/2/3" 更新为 "Start/Build/Scale"。
* **修复 PDF 下载代码**:如果您参考了文档中的 PDF 处理代码,请检查 cURL 命令是否包含 `-L` 参数,或 Python/Java 客户端是否开启了重定向跟随,否则在遇到 302 跳转时代码会失败。
* **审查 Java 文件上传逻辑**:若使用 Java SDK 进行文件上传,建议参考新的 `MultipartField` 示例进行代码重构。
* **探索 Citations 新示例**:如果您使用 TypeScript, C#, Go, PHP 或 Ruby,查看新增的 Citations 代码示例以加速集成。
💭 Model Reasoning
1. **Analyze the Request:**
* **Role:** World-class programmer analyzing documentation changes.
* **Task:** Analyze a single batch of 10 documentation changes (diffs provided).
* **Output Format:** Concise, insightful analysis in Markdown, in Chinese.
* **Structure:**
1. Overall Summary (1-2 sentences).
2. Key Themes (bullets).
3. Impact Level (Low/Medium/High/Breaking) with reasoning.
4. Action Items for Developers (bullets, max 5).
* **Focus:** What matters to developers.
2. **Analyze the Changes (Page by Page):**
* **`devcontainer.md` (-5 lines):**
* *Change:* Removed a list of specific TOC links (Persist auth, Org policy, etc.) and replaced them with a single sentence summary.
* *Theme:* Documentation formatting/cleanup (simplification).
* **`llm-gateway.md` (-9 lines):**
* *Change:* Removed a TOC list. Changed bullet style in the Note block.
* *Theme:* Documentation formatting/cleanup.
* **`sandboxing.md` (-5 lines):**
* *Change:* Removed a "This page covers how to:" TOC list.
* *Theme:* Documentation formatting/cleanup.
* **`sub-agents.md` (-7 lines):**
* *Change:* Removed a TOC list ("Built-in", "Create your own", etc.). Kept the intro sentence about built-ins vs custom.
* *Theme:* Documentation formatting/cleanup.
* **`about-claude/pricing.md` (+5/-7):**
* *Change:* Renamed usage tiers: "Tier 1/2/3/4" -> "Start/Build/Scale". Removed Enterprise tier from the list (implied custom). Clarified text about standard tiers.
* *Theme:* Terminology update (Tier renaming).
* **`api/overview.md` (+3/-3):**
* *Change:* Updated "Rate limits" section description. Clarified how tiers work (auto-placement). Changed action from "contact sales" to "Request rate limit increase" button.
* *Theme:* Process improvement/Clarity on rate limits.
* **`api/rate-limits.md` (+32/-50):**
* *Change:* Major rewrite of the tier system.
* Old: Tier 1-4 tables with credit purchase requirements to advance.
* New: Start/Build/Scale tiers with simple monthly spend caps ($500, $1,000, $200,000). Removed the complex "Credit purchase" requirements table. Simplified the process to request higher limits (removed "Tier-enforced" distinction, just say "Request higher limits" or "Sales"). Removed detailed table of limits (content cut off in diff, but context implies a shift in presentation).
* AWS specific note updated to reflect "Start tier".
* *Theme:* Simplification of the billing/tier model.
* **`build-with-claude/pdf-support.md` (+40/-24):**
* *Change:* Code snippet fixes.
* cURL: Added `-L` flag (follow redirects).
* Python: Added `follow_redirects=True`.
* Java: Added `.followRedirects(HttpClient.Redirect.NORMAL)`.
* Shell scripts: improved variable handling (capturing `FILE_ID`).
* Java File upload: Switched from `Path` to `MultipartField` with `InputStream` (API change or improvement for robustness).
* General: Changed `document.pdf` to `/path/to/document.pdf` (generic placeholders).
* *Theme:* Code correctness (HTTP redirects) and SDK updates.
* **`build-with-claude/citations.md` (+444/-59):**
* *Change:* Massive content expansion.
* Added new intro.
* Added code examples for TypeScript, C#, Go, PHP, Ruby (previously only had Python and Java).
* Updated "Comparison with prompt-based approaches" section.
* *Theme:* Documentation expansion/Sample code availability.
* **`agents-and-tools/tool-use/overview.md` (+53/-18):**
* *Change:* Text rewrites for clarity.
* Intro: "See where tools execute..." vs "Learn where..."
* Explanation of Server vs Client tools refined.
* Added specific section "When Claude uses tools" expanding on `tool_choice` and prompting strategies.
* Removed "Tool use examples" section (redundant/relocated).
* Updated section title about missing parameters.
* *Theme:* Content refinement/Clarity.
3. **Synthesize Themes:**
* **Documentation Structure Cleanup:** Multiple pages (`devcontainer.md`, `llm-gateway.md`, `sandboxing.md`, `sub-agents.md`) removed verbose "This page covers..." TOC lists in favor of inline summaries.
* **Pricing & Rate Limits Overhaul:** Significant simplification of the usage tier model (Tier 1-4 -> Start/Build/Scale), removal of complex credit purchase thresholds, and updated language on requesting increases.
* **Code Quality & SDK Expansion:**
* PDF support examples updated to handle HTTP redirects (important bug fix).
* Java file upload API usage updated to `MultipartField`.
* Citations feature now supports code examples in TypeScript, C#, Go, PHP, and Ruby.
4. **Determine Impact:**
* *Low:* The removal of TOC lists is purely cosmetic/cleanup.
* *Medium:* The Pricing/Tier changes affect how developers understand their limits and potential costs, but the underlying API behavior likely remains the same (just simpler names). The PDF fix is important for robustness.
* *High:* Not "High" or "Breaking" because the API contracts didn't fundamentally change (except maybe the Java SDK nuance), but the operational understanding of limits is significantly improved.
* *Verdict:* **Medium**. While mostly cosmetic, the Pricing/Tier simplification changes how developers communicate about limits with teams, and the PDF redirect fix ensures code actually works. The Citations expansion is a large "Add" but supports existing features.
5. **Draft Action Items:**
* Update internal documentation/knowledge base regarding the new "Start/Build/Scale" tier names.
* If using the PDF examples, update code to follow redirects (add `-L` to curl, `follow_redirects` to Python SDK).
* If using the Java SDK for file uploads, review the updated `MultipartField` example.
* Review the new "When Claude uses tools" section for better prompt engineering strategies.
6. **Draft the Response (in Chinese):**
* *Summary:* 此次更新主要简化了文档结构,重构了定价和速率限制模型(从 Tier 1-4 改为 Start/Build/Scale),并修复了代码示例(特别是 PDF 处理中的重定向问题),同时扩展了引用功能的 SDK 语言支持。
* *Themes:*
* **文档结构简化**:移除了多个页面的冗余目录列表,改用更简洁的段落描述。
* **定价与层级模型重组**:将 `Tier 1-4` 重命名为 `Start/Build/Scale`,移除了复杂的信用额度升级逻辑,简化了费用上限描述。
* **代码示例质量提升与修正**:修复了 PDF 处理示例中缺失 HTTP 重定向跟随的 bug;更新了 Java SDK 的文件上传方式。
* **多语言 SDK 示例扩展**:为 Citations 功能新增了 TypeScript, C#, Go, PHP, Ruby 的代码示例。
* *Impact:* Medium。虽然大多数是格式调整,但定价层级的命名变更影响团队沟通与技术选型文档,而 PDF 代码示例的修正确保了代码在真实网络环境下的正确性。
* *Action Items:*
* 检查并更新内部文档中关于 API 使用层级(Tier)的命名(改用 Start/Build/Scale)。
* 如果复用了文档中的 PDF 处理代码(cURL, Python, Java),务必添加重定向跟随参数以避免下载失败。
* 如果使用 Java SDK 处理文件上传,参考新的 `MultipartField` 用法进行更新。
* 查看 Citations 功能的新增语言示例,评估是否适配您的技术栈。
7. **Review and Refine:**
* The summary covers the breadth.
* Themes accurately reflect the diffs.
* Impact is justified.
* Action items are practical.
* Language is professional Chinese.
(Self-Correction during drafting): Make sure to emphasize the PDF fix specifically, as that's a technical "gotcha" developers might face if they copied old code. Also, clarify that the tier change is mostly renaming/simplification of the backend process, not necessarily a breaking API change, but affects understanding.
*Final Polish:* Ensure markdown syntax is correct.