跳到正文
← 今日

Anthropic ·

SDK 新增计费参数和错误码

SDK 增加了计费策略请求参数、账单相关错误码及外部密钥失败与恢复的事件通知。

你需要知道的

  • 请求新增 billing_policy 参数的测试支持。
  • 消息接口加入合约支出上限已达、关联账单拒绝和用户账单未授权错误码。
  • 新增外部密钥失败与恢复的 Webhook 事件。

原文怎么说

Features * api: add beta support for the billing_policy request parameter * api: add contract_spend_limit_reached error code to messages * api: add error codes for linked billing refusals * api: add the user_profile_billing_not_authorized error code * api: add webhook events for external key failure and recovery Bug Fixes * client: stop reporting failed aiohttp connections as timeouts * types: keep deprecated model aliases and the types nested under them working Chores * api: rename error data models, deprecating

github.com · 发布于 2026-11-18 · 打开原文 ↗