ollama-ai-provider-v2 has 445,705 recorded weekly downloads on npm, a decrease of 46.9% over the past 30 days.
It ranks #265 of 2,251 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by -24.6%.
PluginStats has 543 daily observations since Apr 23, 2025; the latest is from Oct 17, 2026.
About ollama-ai-provider-v2
Ollama Provider V2 for Vercel AI SDK
Use Ollama with the Vercel AI SDK, implementing the official Ollama API. This provider has minimal dependencies and is web-compatible out of the box.
Support this project — Maintained in spare time and free to use under Apache-2.0. If you value this plugin and appreciate it, a donation is appreciated and helps keep it updated with new AI SDK releases.
Why Choose Ollama Provider V2?
• ✅ Minimal Dependencies - Lean codebase with just 2 core dependencies • ✅ Universal Compatibility - Works seamlessly in Node.js, browsers, and edge environments • ✅ Direct Ollama Integration - Uses official Ollama API endpoints for maximum compatibility • ✅ Advanced Features - Tool calling, streaming, thinking mode, embeddings, and completion models • ✅ Type Safety - Full TypeScript support with comprehensive type definitions • ✅ Zero Configuration - Works out-of-the-box with sensible defaults • ✅ Actively Maintained - Regular updates and AI SDK v7 compatibility
Quick Start
Core Features
Streaming Text Generation
Tool Calling Support
AI SDK 7 defaults to a single generation step. When the model calls a tool, that step ends with empty text and populated toolCalls. Set stopWhen to allow the model to execute tools and then answer.
Reasoning Mode (Thinking)
Unique feature for models that support chain-of-thought reasoning:
You can also use the Ollama-specific provider option:
Advanced Ollama Options
Access Ollama's native parameters while maintaining AI SDK compatibility:
Embeddings
Completion Models
For use cases requiring completion-style generation:
Custom Ollama Instance
Connect to remote Ollama servers or custom configurations:
Supported Models
Works with any model in your Ollama installation, including:
• Chat Models: llama3.2, mistral, phi4-mini, qwen2.5, codellama, gemma3 • Vision Models: llava, llama3.2-vision, minicpm-v • Reasoning Models: deepseek-r1:7b, deepseek-r1:1.5b, deepseek-r1:8b • Code Models: codellama:code, codellama:python, deepseek-coder-v2 • Embedding Models: nomic-embed-text, all-minilm, mxbai-embed-large
Prerequisites
1. Ollama installed and running 2. AI SDK v7 (ai@^7) 3. Node.js 22+ (required by AI SDK 7)
Upgrading from 3.x
Version 4.0.0 adds AI SDK 7 support via the Provider V4 specification.
• Requires ai@^7 and Node.js 22+ • Drops AI SDK 5/6 support • No changes to the public createOllama() / ollama() API surface
Contributing
Contributions are welcome! Here's how to get started:
1. Fork the repository 2. Install dependencies: pnpm install 3. Build the project: pnpm build 4. Run tests: pnpm test 5. Make your changes 6. Test locally: Copy dist/* to your project's node_modules/ollama-ai-provider-v2/dist 7. Submit a pull request
License
Apache-2.0 © nordwestt
See LICENSE.md for details.
Description from the npm listing.
- ai
- vercel
- ai-sdk
- ai-sdk-v7
- ollama
- llm
- provider
- chat
- streaming
- tool-calling
- thinking-mode
- completion-models
- local-ai
- embeddings
Where ollama-ai-provider-v2 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 (543)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/ollama-ai-provider-v2. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.