Skip to content
PluginStats

ai-sdk-ollama weekly downloads statistics

By jagreehal · npm · AI SDKs

Vercel AI SDK Provider for Ollama using official ollama-js library

View on npm Fresh · Oct 18, 2026

ai-sdk-ollama has 47,569 recorded weekly downloads on npm, a decrease of 32.2% over the past 30 days, ranking #603 of 2,322 tracked listings.

Weekly downloads
47,569
Official API · Oct 18, 2026
7-day growth
-35.9%
-26.6K weekly downloads
30-day growth
-32.2%
-22.6K weekly downloads
90-day growth
-66.6%
-94.8K weekly downloads
Rank
#603
Among tracked npm listings

About ai-sdk-ollama

AI SDK Ollama Provider

npm version TypeScript Node.js License: MIT

A Vercel AI SDK provider for Ollama, built on the official ollama package. Type-safe, cross-provider compatible, with access to native Ollama features.

Version compatibility

Each ai-sdk-ollama major targets one AI SDK major. Every line stays published on npm, so pick the one that matches your ai version:

ai-sdk-ollamaai (peer)Status
4.x (@latest)ai@^7Active. New features land here.
3.xai@^6Maintenance. Critical fixes only.
2.xai@^5Unmaintained.

AI SDK v7 is stable, so v4 installs from latest. The v3 line still works for AI SDK v6.

Quick Start

# AI SDK v7 (stable)
npm install ai-sdk-ollama ai

# AI SDK v6
npm install ai-sdk-ollama@^3 ai@^6
import { ollama } from 'ai-sdk-ollama';
import { generateText } from 'ai';

// Works in both Node.js and browsers
const { text } = await generateText({
  model: ollama('llama3.2'),
  prompt: 'Write a haiku about coding',
  temperature: 0.8,
});

console.log(text);

Why Choose AI SDK Ollama?

  • Reliable tool calling - Response synthesis adds text after tool execution, so you don't get empty replies
  • Wrapper functions - generateText and streamText return complete responses
  • Built-in reliability - Reliability features run by default
  • Automatic JSON repair - Cascade repair runs jsonrepair first, then an Ollama-specific fallback for trailing commas, comments, URLs, and Python constants
  • Web search and fetch - Built-in tools powered by Ollama's web search API for current information
  • Type-safe - Full TypeScript support with strict typing
  • Cross-environment - Runs in Node.js and browsers automatically
  • Native Ollama options - Use mirostat, repeat_penalty, num_ctx, and more
  • Production-ready - Handles the tool-call and JSON edge cases that otherwise need manual workarounds

Enhanced Tool Calling

The problem this solves: Standard Ollama providers can execute a tool and then return empty text. These wrapper functions synthesize a response so you get complete output.

import { ollama, generateText, streamText } from 'ai-sdk-ollama';

// Enhanced generateText - returns complete responses after tool calls
const { text } = await generateText({
  model: ollama('llama3.2'),
  tools: {
    /* your tools */
  },
  prompt: 'Use the tools and explain the results',
});

// Enhanced streaming - tool-aware streaming
const { textStream } = await streamText({
  model: ollama('llama3.2'),
  tools: {
    /* your tools */
  },
  prompt: 'Stream with tools',
});

Web Search Tools

Web search and fetch: Built-in tools powered by Ollama's web search API for current information.

import { generateText } from 'ai';
import { ollama } from 'ai-sdk-ollama';

// 🔍 Web search for current information
const { text } = await generateText({
  model: ollama('deepseek-v4.1-flash:cloud'), // Cloud models recommended for web search
  prompt: 'What are the latest developments in AI this week?',
  tools: {
    webSearch: ollama.tools.webSearch({ maxResults: 5 }),
  },
});

// 📄 Fetch specific web content
const { text: summary } = await generateText({
  model: ollama('gpt-oss:120b-cloud'),
  prompt: 'Summarize this article: https://example.com/article',
  tools: {
    webFetch: ollama.tools.webFetch({ maxContentLength: 5000 }),
  },
});

// 🔄 Combine search and fetch for comprehensive research
const { text: research } = await generateText({
  model: ollama('gpt-oss:120b-cloud'),
  prompt: 'Research recent TypeScript updates and provide a detailed analysis',
  tools: {
    webSearch: ollama.tools.webSearch({ maxResults: 3 }),
    webFetch: ollama.tools.webFetch(),
  },
});
Web Search Prerequisites
  1. Ollama API Key: Set OLLAMA_API_KEY environment variable
  2. Cloud Models: Use cloud models for optimal web search performance:
    • deepseek-v4.1-flash:cloud - Best for general web search
    • gpt-oss:120b-cloud - Best for complex reasoning with web data
# Set your API key
export OLLAMA_API_KEY="your_api_key_here"

# Get your API key from: https://ollama.com/account

Contents…

Description from the npm listing.

  • ai
  • vercel-ai
  • ollama
  • ai-sdk
  • llm
  • language-model
  • embedding
  • chat
  • local-ai
  • provider
  • typescript
  • embeddings
  • tool-calling

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

ai-sdk-ollama weekly downloads on npm, last 90 days: 47,569 weekly downloads as of Oct 18, 2026, -66.6% over 90 days.ai-sdk-ollamaWeekly downloads on npm · Last 90 days47,569downloads / week-66.6% over 90 days050K100K150K200KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
ai-sdk-ollama weekly downloads on npm, last 90 days: 47,569 weekly downloads as of Oct 18, 2026, -66.6% over 90 days.

7/30/90-day growth

ai-sdk-ollama weekly downloads growth on npm: -35.9% over 7 days, -32.2% over 30 days, -66.6% over 90 days.ai-sdk-ollamaWeekly downloads growth on npm47,569downloads / week now7-day growth-26,643 weekly downloads-35.9%30-day growth-22,575 weekly downloads-32.2%90-day growth-94,812 weekly downloads-66.6%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
ai-sdk-ollama weekly downloads growth on npm: -35.9% over 7 days, -32.2% over 30 days, -66.6% over 90 days.

Ranking history

ai-sdk-ollama npm ranking history: currently #603 (by weekly downloads).ai-sdk-ollamanpm ranking · by weekly downloads · Last 90 days#603current rank#600#605#610#615#620#625Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 18, 2026 – Oct 20, 2026 · 3 observations · Updated Oct 18, 2026pluginstats.com
ai-sdk-ollama npm ranking history: currently #603 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,161 shown · page 31, #3 (overall #603)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs259 listings · 13 pages · page 2, #13 (overall #33)
AI SDKs: every listing in weekly downloads order

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)
Recent weekly downloads observations for ai-sdk-ollama
Date (UTC)Weekly downloadsChange vs. previous
47,569+11.1K
36,516-8.8K
45,352+3.7K
41,684-16.6K
58,243-15.7K
73,9120
73,912-300
74,212+402
73,810+516
73,294-14
73,308+1.6K
71,742+847
70,895-13.9K
84,786—

Similar npm AI SDKs plugins

All 20 ai-sdk-ollama alternatives

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/ai-sdk-ollama. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.