Skip to content
Tools · Dec 4, 2026

Anthropic updates Python SDK with billing policy support and new error codes

Version 2.10.0 of the anthropic-sdk-python adds beta support for the billing_policy parameter, introduces new error codes, and includes documentation clarifications for the Claude Platform on AWS.

Trust79
HypeLow hype

1 source · cross-referenced

ShareXLinkedInEmail
TL;DR
  • Adds beta support for the billing_policy request parameter in the API.
  • Introduces new error codes including contract_spend_limit_reached and user_profile_billing_not_authorized.
  • Clarifies documentation for AWS KMS keys, credential operations, and plugin uploads on the Claude Platform.

Anthropic released version 2.10.0 of the anthropic-sdk-python, which introduces beta support for the billing_policy request parameter in the API. This addition allows developers to specify billing policies directly in their requests, enabling finer-grained control over billing behavior when interacting with Claude models.

The update also adds several new error codes to improve error handling. These include contract_spend_limit_reached, which signals when a contract's spending limit has been exceeded, and user_profile_billing_not_authorized, which indicates that a user profile lacks authorization for billing operations. Additional error codes were introduced for linked billing refusals and external key failures, providing developers with clearer feedback for debugging billing-related issues.

Bug fixes in this release address failed aiohttp connections, which were previously reported as timeouts. The SDK now correctly categorizes these failures, reducing false positives in error reporting for asynchronous operations.

Documentation updates clarify which AWS KMS keys a workspace can use on the Claude Platform on AWS, specifying the supported key types for encryption operations. The release also provides additional context for credential operations, including which credentials are used for get, update, and list operations, and which uploads a plugin can hold back.

The SDK maintains backward compatibility by preserving deprecated model aliases and nested types, ensuring existing codebases continue to function without immediate changes. Deprecations for error data model names were also introduced, with old names retained for compatibility during the transition period.

The changelog notes that content_scan.reason now explicitly states why a verdict is absent in errored scans, clarifying that it is not a security finding. This change helps developers avoid misinterpreting scan results and ensures proper handling of errored scans.

Sources
  1. 01GitHub · anthropics/anthropic-sdk-python releases — v2.10.0
Also on Tools

Stories may contain errors. Dispatch is assembled with AI assistance and curated by human editors; despite the trust-score filter, mistakes happen. We correct publicly — every article links to its revision history. Nothing here is financial, legal, or medical advice. Verify before relying on any claim.

© 2026 Dispatch. No ads. No sponsorships. No paid placement. Reader-supported via Ko-fi.

Built by a person who cares about honest AI news.