ai-sdk-provider-claude-code weekly downloads statistics
By ben-vargas (3 listings) · npm · AI SDKs
AI SDK v7 provider for Claude via Claude Agent SDK (use Pro/Max subscription)
ai-sdk-provider-claude-code has 31,331 recorded weekly downloads on npm, a decrease of 24.0% over the past 30 days, ranking #678 of 2,322 tracked listings.
About ai-sdk-provider-claude-code
AI SDK Provider for Claude Agent SDK
Latest Release: Version 4.x supports AI SDK v7 stable with the Claude Agent SDK. Version 3.x moves to maintenance for AI SDK v6 under the
ai-sdk-v6tag.
ai-sdk-provider-claude-code lets you use Claude via the Vercel AI SDK through the official @anthropic-ai/claude-agent-sdk and the Claude Code CLI.
Version Compatibility
| Provider Version | AI SDK Version | Underlying SDK | NPM Tag | Status | Branch |
|---|---|---|---|---|---|
| 4.x.x | v7 | @anthropic-ai/claude-agent-sdk | latest | Stable | main |
| 3.x.x | v6 | @anthropic-ai/claude-agent-sdk | ai-sdk-v6 | Maintenance | ai-sdk-v6 |
| 2.x.x | v5 | @anthropic-ai/claude-agent-sdk | ai-sdk-v5 | Legacy | ai-sdk-v5 |
| 1.x.x | v5 | @anthropic-ai/claude-code | v1-claude-code-sdk | Legacy | v1 |
| 0.x.x | v4 | @anthropic-ai/claude-code | ai-sdk-v4 | Legacy | ai-sdk-v4 |
Claude Code CLI: provider 4.3.3 bundles Claude Code CLI 2.1.283, the latest CLI release (2026-09-25), through its exact @anthropic-ai/claude-agent-sdk@0.3.283 pin. If you run your own binary via pathToClaudeCodeExecutable, check the minimum Claude Code version noted on individual settings.
Install commands for each line are listed under Installation below.
Zod Compatibility
The 4.x line requires Zod ^4.1.8. Version 3.x remains available for AI SDK v6 under the ai-sdk-v6 tag.
npm install ai-sdk-provider-claude-code ai zod@^4.1.8
Note: Zod 3 support was dropped in v3.2.0 due to the underlying
@anthropic-ai/claude-agent-sdk@0.2.xrequiring Zod 4. If you need Zod 3 support, useai-sdk-provider-claude-code@3.1.x.
Installation
1. Install and authenticate the CLI
See the official docs for platform-specific options.
curl -fsSL https://claude.ai/install.sh | bash
claude auth login
2. Add the provider
# For AI SDK v7 (4.x; current latest tag)
npm install ai-sdk-provider-claude-code ai
# For AI SDK v6 maintenance (3.x)
npm install ai-sdk-provider-claude-code@ai-sdk-v6 ai@^6.0.0
# For AI SDK v5
npm install ai-sdk-provider-claude-code@ai-sdk-v5 ai@^5.0.0
# For AI SDK v4 (legacy)
npm install ai-sdk-provider-claude-code@ai-sdk-v4 ai@^4.3.16
# or use a specific version: npm install ai-sdk-provider-claude-code@^0.2.2
Disclaimer
This is an unofficial community provider and is not affiliated with or endorsed by Anthropic or Vercel. By using this provider:
- You understand that your data will be sent to Anthropic's servers through the Claude Agent SDK
- You agree to comply with Anthropic's Terms of Service
- You acknowledge this software is provided "as is" without warranties of any kind
Please ensure you have appropriate permissions and comply with all applicable terms when using this provider.
Quick Start
AI SDK v7 (latest)
// npm install ai-sdk-provider-claude-code ai
import { streamText } from 'ai';
import { claudeCode } from 'ai-sdk-provider-claude-code';
const result = streamText({
model: claudeCode('haiku'),
prompt: 'Hello, Claude!',
});
const text = await result.text;
console.log(text);
AI SDK v6 (maintenance)
// npm install ai-sdk-provider-claude-code@ai-sdk-v6 ai@^6.0.0
import { streamText } from 'ai';
import { claudeCode } from 'ai-sdk-provider-claude-code';
const result = streamText({
model: claudeCode('haiku'),
prompt: 'Hello, Claude!',
});
const text = await result.text;
console.log(text);
AI SDK v5
// npm install ai-sdk-provider-claude-code@ai-sdk-v5 ai@^5.0.0
import { streamText } from 'ai';
import { claudeCode } from 'ai-sdk-provider-claude-code';
const result = streamText({
model: claudeCode('haiku'),
prompt: 'Hello, Claude!',
});
const text = await result.text;
console.log(text);
Breaking Changes
Version 4.0.0 (AI SDK v7)
This release ports the provider to AI SDK v7 / LanguageModelV4, adds first-class Claude Agent SDK callback, query-controller, MCP, and image support, and keeps the v7 support boundaries explicit:
- Requires Node.js ≥ 22 and Zod
^4.1.8 - ESM-only package output; CommonJS
require()is no longer available - Tool failures now use spec
tool-resultparts/events withisError: trueinstead of the provider-specifictool-errorstream extension
Optional AI SDK v7 surfaces not implemented
Version 4.0.0 intentionally keeps optional provider surfaces absent unless the Claude Agent SDK has a durable provider-reference mapping:…
Description from the npm listing.
- ai-sdk
- claude-agent-sdk
- anthropic
- cli
- language-model
- llm
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (122)Similar npm AI SDKs plugins
All 20 ai-sdk-provider-claude-code alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/ai-sdk-provider-claude-code. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.