Skip to content
Tools · Dec 3, 2026

Anthropic updates Python SDK with streaming, tool-use, and error-handling changes

Version 2.17.0 of the anthropic-sdk-python library introduces new API features, stricter error handling for streams and tools, and performance tweaks. Changes affect analytics, connection errors, and memory handling.

Trust80
HypeLow hype

1 source · cross-referenced

ShareXLinkedInEmail
TL;DR
  • Adds beta analytics list of projects via a new API endpoint
  • Tightens error handling for dropped streams and tool-use rejections
  • Improves memory usage and performance for streaming and structured outputs
  • Updates client behavior for headers, retries, and credential handling

Anthropic released version 2.17.0 of the anthropic-sdk-python library, which includes new API features, bug fixes, and performance improvements. The update adds a beta analytics endpoint for listing projects in the new Projects experience and introduces a new error code, organization_url_fetch_disabled.

Error handling for streaming and tool use has been tightened. When a JSONL stream or mid-stream connection drops, the SDK now raises anthropic.APIConnectionError (or anthropic.APITimeoutError for timeouts) instead of propagating lower-level HTTP errors. Code catching httpx-specific exceptions around batch results or streams should be updated to catch the Anthropic-specific exceptions to avoid breakage.

Tool-use behavior has also changed: when the API refuses a tool’s result, the SDK now passes the API’s full error message to the model, including status, message, error code, request ID, path, type, and details. Additionally, replace_all edits that would exceed the default 256 KiB file size limit are now refused, leaving the file unchanged.

Client-side changes include stricter retry logic: if a response body is dropped and the x-should-retry header is false, the client raises the error after one request instead of retrying. Header handling has been refined so middleware can safely inspect or redact client headers, including credentials, without leaking sensitive data.

Memory and performance updates include preventing unbounded memory growth when types are created per request, stopping memory growth during structured outputs, and enforcing stricter timeouts during environment memory uploads and syncs. The SDK also improves schema handling for fields with $ref, preserving descriptions that were previously lost during schema transformation.

Sources
  1. 01GitHub · anthropics/anthropic-sdk-python releases — v2.17.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.