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 23,970 recorded weekly downloads on npm, a decrease of 43.3% over the past 30 days, ranking #713 of 2,256 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-v6 tag.
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.
Note: Zod 3 support was dropped in v3.2.0 due to the underlying @anthropic-ai/claude-agent-sdk@0.2.x requiring Zod 4. If you need Zod 3 support, use ai-sdk-provider-claude-code@3.1.x.
Installation
- Install and authenticate the CLI
See the official docs for platform-specific options.
- Add the provider
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)
AI SDK v6 (maintenance)
AI SDK v5
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-result parts/events with isError: true instead of the provider-specific tool-error stream 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:
• ProviderV4.files() is not implemented yet. The AI SDK interface uploads { type: 'data' } or { type: 'text' } bytes and returns a reusable provider reference, but Claude Agent SDK 0.3.283 exposes no direct upload/reuse API for that contract. This provider forwards inline image file parts in prompts; non-image inline files (for example PDFs) emit an unsupported-file call warning and are not forwarded. It does not upload files into durable provider references. • Canonical V4 tool-result file parts are replayed into conversation history as text markers like [File : ]; raw file bytes are not re-sent on replay. Richer tool-result file replay, such as re-sending actual image/file bytes for tool-result file parts, is deferred. • ProviderV4.skills() is not implemented yet. Claude Code skills are loaded from configured user/project/local skill directories with the existing skills setting below; there is no Agent SDK API that uploads a skill bundle and returns an AI SDK provider reference. • Workflow serialization is deferred. @ai-sdk/provider-utils@5.0.27 exposes WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE, and serializeModelOptions() for provider model classes in the AI SDK v7 stack, but this provider has not added a serialization contract for provider instances or settings. Callback/function settings such as canUseTool, hooks, logger, spawnClaudeCodeProcess, and SessionStore methods are not JSON-serializable and must be recreated by the application. • V4 custom and reasoning-file parts are not emitted as provider output yet. Claude Agent SDK 0.3.283 has no durable reasoning-file artifact output that maps to AI SDK reasoning-file; assistant-history custom and reasoning-file parts have no Claude Code replay representation and are skipped (unknown unsupported content variants still warn).
Version 3.0.0 (AI SDK v6 Stable)
This version upgrades to AI SDK v6 stable with updated provider types:
• usage.raw now contains raw provider usage (previously in providerMetadata['claude-code'].rawUsage) • Internal type changes for LanguageModelV3Usage and LanguageModelV3FinishReason (transparent to most users)
Version 2.0.0 (Claude Agent SDK Migration)
This version migrates to @anthropic-ai/claude-agent-sdk with new defaults for better control:
• System prompt is no longer applied by default • Filesystem settings (CLAUDE.md, settings.json) are no longer loaded by default • See Migrating to Claude Agent SDK section below for migration details
Version 1.x (AI SDK v5)
See Breaking Changes Guide for details on migrating from v0.x to v1.x.
Key changes:
• Requires AI SDK v5 • New streaming API pattern • Updated token usage properties • Changed message types
Models
• fable - Claude Fable (most capable) • opus - Claude Opus (highly capable) • sonnet - Claude Sonnet (balanced performance) • haiku - Claude Haiku (fastest, most cost-effective)
You can also use full model identifiers directly (e.g., claude-fable-5, claude-sonnet-4-6, claude-opus-4-8).
Documentation…
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 (121)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 19, 2026. See the methodology.