@tanstack/ai-anthropic has 91,409 recorded weekly downloads on npm, an increase of 33.5% over the past 30 days.
It ranks #464 of 2,256 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by +78.2%.
PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.
About @tanstack/ai-anthropic
@tanstack/ai-anthropic
Anthropic Claude adapter for TanStack AI chat, tool calling, thinking, and structured outputs
Installation
Setup
Set your API key as an environment variable:
Usage
Text/Chat Adapter
With Explicit API Key
With Tools
Thinking
Set how hard Claude thinks with reasoning on chat(). The adapter sends the right thinking fields for the model:
Models that think with a token budget, such as Claude Haiku 4.5, also take reasoning: { level: 'high', budgetTokens: 8000 }. The adapter raises max_tokens when it is below the budget. The types take only the levels and options of the selected model. See the docs for the levels of each model.
Prompt Caching
Mark a content part with cache_control to cache it:
Summarization
Provider Tools
Anthropic's native tools live on @tanstack/ai-anthropic/tools and go into chat({ tools }) alongside your own: webSearchTool, webFetchTool, codeExecutionTool, computerUseTool, bashTool, textEditorTool, memoryTool, and customTool.
Claude on Vertex AI
Install @anthropic-ai/vertex-sdk next to this package and import from @tanstack/ai-anthropic/vertex:
location is required (on the factory or via GOOGLE_CLOUD_LOCATION, GOOGLE_VERTEX_LOCATION, or CLOUD_ML_REGION); project can come from Application Default Credentials. Only the Claude models in the Vertex catalog are accepted.
Features
• ✅ Streaming chat • ✅ Function/tool calling and Anthropic's native provider tools • ✅ Extended and adaptive thinking • ✅ Structured output • ✅ Prompt caching • ✅ Summarization (anthropicSummarize) • ✅ Claude on Vertex AI (@tanstack/ai-anthropic/vertex)
Documentation
• Anthropic adapter: configuration, per-model thinking rules, every provider tool, and the API reference • Provider Tools: the concept, comparison matrix, and which models support which tools
License
MIT
Description from the npm listing.
- ai
- ai-sdk
- typescript
- tanstack
- anthropic
- claude
- adapter
- chat
- tool-calling
- structured-outputs
- thinking
Where @tanstack/ai-anthropic sits in the listing
Each band is one page of 20. Weekly downloads on a log 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.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
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.
Recent observations
Full history (121)Similar npm AI SDKs plugins
Data 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/@tanstack/ai-anthropic. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.