Blog
2 min read

Anthropic Python SDK 1.0: httpx2, Python 3.10+, and Removed Parameters

Anthropic released v1.0 of its Python SDK on 20 August 2026. It moves the HTTP layer to httpx2, requires Python 3.10+, and removes the legacy Text Completions API, the temperature/top_p/top_k parameters on Messages methods and the tool runner's compaction_control. What breaks and how to upgrade.

Anthropic released version 1.0 of its Python SDK (anthropic) on 20 August 2026. If your requirements file says anthropic>=0.x without an upper bound, a fresh install may already be pulling it — so it's worth knowing what changed.

What changed

  • HTTP layer moves from httpx to httpx2, a maintained, API-compatible fork. If you build custom http_client, Timeout or transport objects, import them from httpx2. The DefaultHttpxClient helpers are unchanged. If you use tracing or mocking libraries that patch httpx, call httpx2.alias_httpx() at startup.
  • Python 3.10 or later is required.
  • Removed long-deprecated surface:
    • the legacy Text Completions API,
    • the temperature, top_p and top_k parameters on Messages methods,
    • the tool runner's client-side compaction_control.
  • Async client: .with_raw_response results now need await response.parse().
  • AnthropicBedrock raises an error when no AWS region is configured, instead of defaulting to us-east-1.

The sampling-parameter removal lines up with the models: current models such as Haiku 5.5 return an error for non-default temperature, top_p and top_k anyway. (LLM Temperature Explained)

How to upgrade

  1. Pin first. Make sure production installs are pinned in requirements.txt or your lockfile so nothing upgrades by surprise. (requirements.txt)
  2. On a branch, upgrade: pip install -U anthropic.
  3. Search for what's removed:
grep -rn -E "completions\.create|temperature=|top_p=|top_k=|compaction_control" --include=*.py .
  1. Remove sampling parameters, replace any Completions calls with Messages, and move custom httpx objects to httpx2.
  2. Run your tests, especially anything that parses responses — current models can return thinking blocks before text, so select content by type.

Anthropic's v1 migration guide has before-and-after snippets for every change.

Why it matters

A major version bump in an SDK your app depends on is exactly the kind of change that breaks production on the next deploy with an unpinned dependency. Pin versions, update deliberately, and let your CI run the tests. (Update Dependencies Safely, Semantic Versioning Explained)

Source: Claude Platform release notes · SDK v1.0.0 release


EasySpawn gives Claude Code your whole Python project on a persistent server, so an SDK migration like this can be done on a branch, tested and handed to you as one pull request. See how it works or join the waitlist.

Related: Python Virtual Environments · What Is an SDK? · Get a Claude API Key · Claude Haiku 5.5 Released

Keep reading