🤖 AI Batch Analysis
## 文档变更批量分析
### 1. 总体概述
本次变更主要涉及两类:**Markdown 表格格式标准化**(约 45 页,将手工对齐的长表格统一改为紧凑的 `| ----- | ----- |` 格式,纯样式变更,无内容影响)以及 **`api/messages.md` 中的实质性 API 参考更新**(对象类型命名变更、新增错误码、章节重组),另有一个新增 beta header。
### 2. 关键主题
- **表格格式标准化**:`intro.md`、`models/overview.md`、`pricing.md`、`model-deprecations.md`、`api/overview.md`、`rate-limits.md`、`beta-headers.md`、`service-tiers.md`、`errors.md`、`client-sdks.md`、`vision.md`、`pdf-support.md`、`prompt-caching.md`、`batch-processing.md`、`context-editing.md`、`citations.md`、`search-results.md`、`extended-thinking.md`、`streaming.md`、`build-with-claude/overview.md`、`text-generation.md` 等大量页面仅做表格压缩,**无内容变化**。
- **错误对象类型重命名**:`api/messages.md`、`count_tokens.md`、`batches/create.md` 中,多个 `*ToolResultError` 对象类型统一加上 `Object` 后缀(如 `WebSearchToolRequestError` → `WebSearchToolRequestErrorObject`,`BashCodeExecutionToolResultError` → `BashCodeExecutionToolResultErrorObject`,`CodeExecutionToolResultError`、`TextEditorCodeExecutionToolResultError`、`ToolSearchToolResultError` 同理)。**注意:`type` 字段的字符串值(如 `"bash_code_execution_tool_result_error"`)未变**,因此线上报文格式不变。
- **新增错误码**(`api/messages.md`):
- `image_dimensions_too_large` (400) — 图片最长边超限
- `user_profile_required` (400) — 设了 `bill_to: "user_profile"` 但未传 profile
- `linked_organization_billing_unavailable` (402)
- `linked_organization_spend_limit_reached` (402)
- `user_profile_billing_not_authorized` (403)
- `user_profile_not_billable` (403)
- `contract_spend_limit_reached` (429)
- **API 参考章节重组**:`api/messages.md` 中将 `BashCodeExecutionToolResultError` 和 `CodeExecutionToolResultError` 的 "Error Code" 枚举与 "Error Object" 拆分为独立章节,顺序调整。
- **新增 beta header**:`api/beta/files/upload.md` 增加 `ce-claude-code-managed-settings-2026-10-06`,与 Claude Code 托管设置相关。
### 3. 影响级别:**Medium**
- **不构成 Breaking**:所有重命名的对象类型只是文档侧 schema 名称变化,API 报文中的 `type` 字符串值未改,普通 API 调用方不受影响。
- **可能影响 SDK 维护者与代码生成**:从 OpenAPI/类型生成 SDK 的开发者,类型名会从 `WebSearchToolRequestError` 变为 `...Object`,需要同步更新生成代码与使用处的类型引用。
- **新增错误码需处理**:涉及用户画像计费(user profile billing)与合约限额的错误码是全新能力,开发者应将其纳入错误处理与重试逻辑,尤其是做计费代理或代付场景的应用。
- **新增 beta header 是增量的**,仅影响使用该 beta 功能的开发者。
### 4. 开发者行动项
- **[SDK/类型生成]** 若从 API 规范自动生成类型,重新生成 SDK 以同步 `*ToolResultError` → `*ToolResultErrorObject` 的重命名,避免编译错误。
- **[错误处理]** 在错误处理逻辑中新增对 `user_profile_required`、`linked_organization_billing_unavailable`、`linked_organization_spend_limit_reached`、`user_profile_billing_not_authorized`、`user_profile_not_billable`、`contract_spend_limit_reached` 的识别与用户友好提示。
- **[图像处理]** 对 `image_dimensions_too_large` (400) 做客户端预校验或降级处理,确保图片最长边不超 `max_side_length_pixels`。
- **[Beta 功能]** 若使用 Claude Code 托管设置相关能力,在 beta header 中加入 `ce-claude-code-managed-settings-2026-10-06`。
- **[文档引用]** 若内部文档或代码注释引用了旧对象类型名,批量更新为新名称以保持一致。
💭 Model Reasoning
Let me analyze these documentation changes carefully.
The changes span 50 pages, but looking at the diffs, the vast majority are **Markdown table formatting changes** - converting from manually-padded/aligned tables to compact `| ----- | ----- |` style tables. This is a purely cosmetic/documentation build system change.
However, there are some substantive changes buried in there:
1. **`api/messages.md`** - Significant changes:
- Object type renames: `WebSearchToolRequestError` → `WebSearchToolRequestErrorObject`, `BashCodeExecutionToolResultError` → `BashCodeExecutionToolResultErrorObject`, `CodeExecutionToolResultError` → `CodeExecutionToolResultErrorObject`, `TextEditorCodeExecutionToolResultError` → `TextEditorCodeExecutionToolResultErrorObject`, `ToolSearchToolResultError` → `ToolSearchToolResultErrorObject`
- New error codes added:
- `image_dimensions_too_large` (400) - image too large
- `user_profile_required` (400) - billing policy set to user_profile but no profile named
- `linked_organization_billing_unavailable` (402)
- `linked_organization_spend_limit_reached` (402)
- `user_profile_billing_not_authorized` (403)
- `user_profile_not_billable` (403)
- `contract_spend_limit_reached` (429)
- Restructuring of `BashCodeExecutionToolResultError` section - splitting out Error Code and Error Object into separate sections
2. **`api/beta/files/upload.md`** - New beta header: `ce-claude-code-managed-settings-2026-10-06`
3. **`api/count_tokens.md`** and **`api/messages/batches/create.md`** - Same object rename propagated
4. The rest are table formatting changes across many pages.
Let me structure the analysis.
Key themes:
- Markdown table format normalization (bulk of changes)
- API object type naming convention change (adding "Object" suffix)
- New error codes for user profile billing and image dimensions
- New beta header for Claude Code managed settings
- Section reorganization in messages API reference
Impact:
- The object renames could be breaking for developers who parse API reference schema names or use code generation from the spec. But these are documentation-side object names, not necessarily API field names. Looking more carefully, these are schema object names in the API reference docs. The `type` field values (like `"bash_code_execution_tool_result_error"`) remain unchanged, so the actual API wire format is likely unchanged. But SDK code generation or typed SDK users might see type name changes.
- New error codes are additive - developers should handle them.
- The beta header is new - additive.
Impact level: Medium - the object renames and new error codes require attention, especially for SDK maintainers and error-handling logic. Not breaking for most API consumers since wire format `type` values are unchanged, but could affect typed SDK users.
Let me write this up concisely in Chinese as requested.