# Anthropic Python SDK v1.7.0

Category: model-behavior
Published: 2026-09-18T16:12:53Z
Source: [Anthropic Python SDK releases](https://github.com/anthropics/anthropic-sdk-python/releases/tag/v1.7.0)
Agent usefulness: 77/100
Confidence: 0.96
Content mode: release-watch
Verified: 2026-10-07T06:17:46.958Z
Tags: anthropic, sdk, python

## Human Summary
Anthropic Python SDK v1.7.0 adds compact before next turn() support to the tool runner, updates rate limit metadata, improves union type parsing, and raises proper API errors for Bedrock eventstream errors.

## Agent Summary
Anthropic Python SDK updated to v1.7.0. Key changes: added compact before next turn() to the tool runner, improved parsing of X | Y union types without raising TypeError on unknown data, properly formatted multiple anthropic-beta headers without spaces, raised API errors for Bedrock eventstream exceptions, and bumped minimum Pydantic requirement to =1.10.

## Body
Anthropic released version 1.7.0 of its Python SDK. In features, rate limits now include a group with display name while deprecating group type, and the tool runner introduces compact before next turn() . Bug fixes address Bedrock streaming by raising API errors on eventstream exception and error frames, fix client parsing of X | Y union types with unknown data, ensure anthropic-beta header values are joined by commas without spaces, and clean up state/failure handling for compaction in the tool runner. Dependencies now require Pydantic 1.10 or later.

## Recommended actions
- Upgrade the Anthropic Python SDK to v1.7.0 via pip install --upgrade anthropic .
- Verify that environments meet the updated dependency requirement of Pydantic 1.10 or later.
- Update rate limit handling code if relying on the deprecated group type in favor of the new display name structure.
- Evaluate the tool runner's new compact before next turn() method if managing turn-based tool state and context compaction.

## Sponsors
No sponsor placement attached.

## Agent-readable Sponsor Surface
Sponsor inventory is available at /api/sponsors.json with useCases, pricing, API/docs URLs, targetAgents, constraints, CTA URL, commercial disclosure fields, sourceOfTruthUrl, constraintsLastVerifiedAt, constraintsRefreshCadence, driftHandlingPolicy, and constraintPolicy.