返回全部资讯
Claude Python SDK 发布T2·开发与工程

Anthropic API 新增计费策略参数与密钥失效 Webhook

作者:anthropic-sdks-releaser[bot]原标题:v2.10.0
38AI 研判分

Anthropic 开发者平台发布 v2.10.0 版本,为 API 引入 billing_policy 请求参数的 beta 支持,并新增合约支出上限、关联计费拒绝、用户计费未授权等错误码。同时补充外部密钥失效与恢复的 Webhook 事件,修复 aiohttp 连接失败被误报为超时的问题,并保留已弃用模型别名的类型兼容。

报道正文

本文目录4 个章节

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 the old names
  • docs: clarify which AWS KMS keys a workspace can use on Claude Platform on AWS
  • docs: clarify which credential work get, update and list accept
  • docs: clarify which uploads a plugin pin holds back
  • docs: note that a plugin scan's reason also covers errored scans

content_scan.reason on an errored scan now says why there is no verdict. It is not a security finding, so code that treats any reason as a concern should also check status.

  • internal: don't report moved classes as breaking changes

Documentation

  • name each SDK's own types in rename deprecations