anth-upgrade-migration

Featured

Upgrade Anthropic SDK versions and migrate between Claude API versions. Use when upgrading the Python/TypeScript SDK, migrating from Text Completions to Messages API, or adopting new API features like tool use or batches. Trigger with phrases like "upgrade anthropic sdk", "anthropic migration", "update claude sdk", "migrate to messages api".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Anthropic Upgrade & Migration ## Overview Guide for upgrading the Anthropic SDK and migrating between API versions. The SDK follows semver — major versions may have breaking changes. ## Check Current Versions ```bash # Python pip show anthropic | grep Version # Version: 0.40.0 # TypeScript npm list @anthropic-ai/sdk # @anthropic-ai/sdk@0.35.0 # Check latest available pip index versions anthropic 2>/dev/null | head -1 npm view @anthropic-ai/sdk version ``` ## Upgrade Path ### Step 1: Create Upgrade Branch ```bash git checkout -b upgrade/anthropic-sdk ``` ### Step 2: Upgrade SDK ```bash # Python pip install --upgrade anthropic pip show anthropic | grep Version # TypeScript npm install @anthropic-ai/sdk@latest ``` ### Step 3: Review Breaking Changes Key breaking changes by version: **Python SDK 0.20+ (anthropic-version: 2023-06-01)** ```python # OLD: Text Completions API (deprecated) response = client.completions.create( model="claude-2", prompt="\n\nHuman: Hello\n\nAssistant:", max_tokens_to_sample=256 ) # NEW: Messages API response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=256, messages=[{"role": "user", "content": "Hello"}] ) ``` **Python SDK 0.30+ (streaming changes)** ```python # OLD: Manual SSE parsing response = client.messages.create(..., stream=True) for line in response.iter_lines(): ... # NEW: High-level streaming with client.messages.stream(...) as stream: for text in stream.text_stream:...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category