Skip to content
All news
ReleaseAI-written

Anthropic SDK for Python 2.10.0 adds billing_policy support and new billing error codes

Version 2.10.0 introduces beta billing_policy request support, adds contract_spend_limit_reached and user_profile_billing_not_authorized error codes, and adds webhook events for external key failure and recovery.

Anthropic released version 2.10.0 of its Python SDK on 2026-11-17. The update adds beta support for the billing_policy request parameter, introduces several new billing‑related error codes, and provides webhook events for external key failure and recovery.

The API now accepts the billing_policy parameter in beta mode. New error codes include contract_spend_limit_reached, a set of codes for linked billing refusals, and user_profile_billing_not_authorized. The SDK also renames the error data model types, deprecating the previous names, so client code must reference the new type identifiers.

Webhook support expands to emit events when an external key fails and when it recovers, allowing applications to react to credential status changes. Additionally, the client no longer treats failed aiohttp connections as timeouts, improving error distinction for network failures.

Deprecated model aliases and their nested types remain functional in the type definitions, preserving compatibility for existing code. The content_scan.reason field now reports why an errored scan lacks a verdict instead of indicating a security finding.