缓存诊断功能已在 Claude API 上结束测试,不再需要 cache-diagnosis-2026-04-07 测试版标头。在 Messages 请求中包含 diagnostics 对象即可启用;仍然发送该标头的请求与之前一样工作。来自 POST /v1/messages 的响应现在始终包含 diagnostics 字段,当请求未包含 diagnostics 对象时该字段为 null。
Cache diagnostics is out of beta on the Claude API and no longer requires the cache-diagnosis-2026-04-07 beta header. Include the diagnostics object on a Messages request to opt in; requests that still send the header work as before. Responses from POST /v1/messages now always include the diagnostics field, which is null when the request did not include the diagnostics object.
本文内容采集自官方网站,排版和翻译可能与原页面存在差异。
阅读官方全文