apiwatch

All changes / Anthropic

Breaking sdk

Anthropic Python SDK v1.0 (August 20, 2026) removed long-deprecated surface; completions.create, HUMAN_PROMPT/AI_PROMPT, temperature/top_p/top_k, schema-dict output_format and compaction_control fail after upgrading to anthropic>=1

Took effect · Anthropic Python SDK v1.0 (anthropic>=1) — removed Text Completions API, sampling parameters, compaction_control and deprecated exports

Reviewed against the vendor source on Oct 23, 2026 (AI-assisted review). Key facts are re-checked against the source daily.

What changes

v1.0 requires Python 3.10+ and moves the HTTP layer from httpx to httpx2 (passing an httpx.Client as http_client raises TypeError). It removes client.completions.create() with HUMAN_PROMPT/AI_PROMPT, the temperature/top_p/top_k parameters on Messages methods (passing them is a TypeError; on API version 2023-06-01 the API still honours them for older models via extra_body, but from anthropic 2.0.0 requests use API version 2026-10-21 by default, which rejects them with a 400 even at their default values), output_format as a schema dict, the tool runner's compaction_control/CompactionControl, and the exports BetaBase64PDFBlockParam, anthropic.Transport, ProxiesTypes and agent_toolset.READ_MAX_BYTES. Async .with_raw_response results now need await response.parse(), and AnthropicBedrock raises when no AWS region is configured.

Breaking: Calls fail after this date.

What to do

Before bumping to anthropic>=1: move completions.create calls to messages.create; drop temperature/top_p/top_k (use extra_body={"temperature": ...} only on API version 2023-06-01 (the anthropic 1.x default) and only for an older model that still honours it; anthropic 2.x sends API version 2026-10-21 by default, which rejects all three, see anthropic-2026-10-21-api-version-messages-request-changes); pass schema dicts as output_config={"format": {...}} and keep output_format= for classes; replace compaction_control with server-side context_management compaction; swap BetaBase64PDFBlockParam for BetaRequestDocumentBlockParam and READ_MAX_BYTES for DEFAULT_MAX_FILE_BYTES; build custom HTTP objects from httpx2; await response.parse() on async raw responses; set aws_region for AnthropicBedrock.

Strings to search for

completions.createHUMAN_PROMPTAI_PROMPTtemperature=top_p=top_k=output_format={compaction_controlCompactionControlBetaBase64PDFBlockParamanthropic.TransportProxiesTypesREAD_MAX_BYTES

Not affected (matches inside these are ignored): chat.completions.create

Counts only in files matching *.py; files that mention import anthropic or from anthropic or anthropic.Anthropic( or anthropic.AsyncAnthropic(.

Source

https://github.com/anthropics/anthropic-sdk-python/blob/main/MIGRATION.md