coding by Ryan Caldwell

Updating llm-anthropic for Anthropic SDK 1.0.0

This guide explains how to update the llm-anthropic plugin to work with version 1.0.0 of the Anthropic SDK, covering breaking changes and migration steps for

A developer maintaining a chatbot application needs to update their dependencies to keep pace with the latest Python SDK changes from Anthropic. When the anthropic library released version 1.0.0, it introduced a breaking change that affects any plugin or tool built on top of it - including llm-anthropic, the plugin that connects Simon Willison’s LLM command-line tool to Claude models.

Migration Approach

The llm-anthropic 0.27 release centers on one primary goal: compatibility with anthropic v1.0.0. According to the announcement, the core change in the underlying SDK involves switching from httpx to httpx2 for HTTP requests. This mirrors a similar transition OpenAI made in their v3.0.0 release two weeks earlier, suggesting a broader ecosystem shift toward the newer HTTP client library.

Anthropic published a migration guide at https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/refs/heads/main/MIGRATION.md to help developers navigate the upgrade path. Rather than manually working through the changes, the developer behind llm-anthropic took an AI-assisted approach, prompting Fable 5 in Claude Code with: “Upgrade to anthropic>=1 - read https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/refs/heads/main/MIGRATION.md and get the tests passing.”

This workflow demonstrates how developers can leverage AI coding assistants to handle dependency upgrades by pointing them directly at official migration documentation. The resulting pull request shows the concrete changes needed to maintain compatibility.

Breaking Changes and Compatibility

The shift from httpx to httpx2 represents a breaking change at the HTTP transport layer. While the specifics of what httpx2 changes aren’t detailed in the release notes, such transitions typically involve API modifications, different async handling, or updated connection pooling strategies. For plugin maintainers, this means updating not just import statements but potentially how HTTP requests are configured and error handling is implemented.

The llm-anthropic plugin serves as a bridge between the LLM command-line tool and Anthropic’s Claude model series. When the underlying anthropic library changes its HTTP client, the plugin must adapt to ensure requests continue flowing correctly from the command line to Claude’s API endpoints.

Installation and Usage

Developers using llm-anthropic can upgrade to version 0.27 through standard Python package management. The plugin requires anthropic>=1.0.0, establishing a minimum version constraint that ensures compatibility with the new HTTP client.

For projects with existing dependencies on older anthropic versions, upgrading llm-anthropic to 0.27 will trigger an upgrade of the anthropic library itself. This cascading update means developers should review their own code for any direct anthropic SDK usage that might need adjustment according to the migration guide.

Ecosystem Implications

The timing of these releases - OpenAI switching to httpx2 in v3.0.0 followed by Anthropic making the same move - points to httpx2 becoming a standard choice for Python AI SDK development. Plugin and wrapper library maintainers should anticipate similar migrations across other AI provider SDKs.

For developers building on top of these tools, the lesson is clear: major version bumps in foundational libraries create ripple effects. Maintaining compatibility requires either manual migration work or, as demonstrated here, leveraging AI assistants with access to official migration documentation. The llm-anthropic 0.27 release shows how quickly these updates can propagate when the right tools and documentation are in place.