Anthropic TypeScript SDK v1.10.0 Adds Billing Policy and New Error Handling
Version 1.10.0 of the Anthropic TypeScript SDK introduces beta support for the billing_policy API parameter, new error codes, webhook events for external key failures, and data model renaming. These changes improve billing granularity and error handling in API integrations.
What changed?
Anthropic released version 1.10.0 of its TypeScript SDK. The update adds beta support for the billing_policy request parameter, introduces new billing-related error codes (including contract_spend_limit_reached, linked billing refusals, and user_profile_billing_not_authorized), and adds webhook events for external key failure and recovery. Error data models have been renamed, and the old names are now deprecated.
Why does it matter to an everyday developer?
These changes allow developers to specify billing policies on API requests, receive more granular feedback about billing and authorization failures, and react programmatically to external key failures via new webhook events. The renamed error models signal a pending transition in the data structure, and continued use of deprecated names could lead to future compatibility issues.
What can the developer do now?
Developers can start using the new billing_policy parameter in API requests for more granular billing controls (currently in beta). Error handling code should be updated to recognize new error codes and renamed error data models to prevent downstream issues. Webhook integrations can now be enhanced to respond to external key failure and recovery, improving automation and error mitigation in production systems.


