Skip to content
PluginStats

watsonx-ai-provider weekly downloads statistics

By IBM (4 listings) · npm · AI SDKs

IBM watsonx.ai provider for the Vercel AI SDK - access Granite, OpenAI, Llama, Mistral, and other foundation models

View on npm Stale · Oct 18, 2026

watsonx-ai-provider has 445 recorded weekly downloads on npm.

Weekly downloads
445
Official API · Oct 18, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
—
Among tracked npm listings

About watsonx-ai-provider

IBM watsonx.ai Provider for Vercel AI SDK

The watsonx.ai provider for the Vercel AI SDK enables integration with IBM watsonx.ai foundation models, including Granite, OpenAI, Meta Llama, Mistral, and other models hosted on watsonx.ai.

Installation

npm install watsonx-ai-provider

Compatibility: v2.x targets AI SDK v6 and Node.js 20.3+. For AI SDK v4 use the v1.x line.

Setup

Set the environment variables:

WATSONX_AI_APIKEY=your-ibm-cloud-api-key
WATSONX_AI_PROJECT_ID=your-watsonx-project-id

You can obtain these from:

Quick start

import { generateText } from 'ai';
import { watsonx } from 'watsonx-ai-provider';

const { text } = await generateText({
  model: watsonx('openai/gpt-oss-120b'),
  prompt: 'What is machine learning?',
});

console.log(text);

The default watsonx instance reads WATSONX_AI_APIKEY and WATSONX_AI_PROJECT_ID from the environment. For custom configuration, use createWatsonx:

import { createWatsonx } from 'watsonx-ai-provider';

const watsonx = createWatsonx({
  apiKey: process.env.MY_KEY,
  projectId: process.env.MY_PROJECT,
  baseURL: 'https://eu-de.ml.cloud.ibm.com', // optional region
  fetch: customFetch,                        // optional — for testing/proxying
});

createWatsonx also accepts custom headers and a generateId function for deterministic test IDs.

Streaming

import { streamText } from 'ai';
import { watsonx } from 'watsonx-ai-provider';

const result = streamText({
  model: watsonx('openai/gpt-oss-120b'),
  prompt: 'Write a short poem about AI.',
});

for await (const chunk of result.textStream) {
  process.stdout.write(chunk);
}

Tool calling

import { generateText, tool } from 'ai';
import { watsonx } from 'watsonx-ai-provider';
import { z } from 'zod';

const result = await generateText({
  model: watsonx('openai/gpt-oss-120b'),
  prompt: 'What is the weather in Tokyo?',
  tools: {
    getWeather: tool({
      description: 'Get the current weather for a location',
      inputSchema: z.object({
        location: z.string().describe('The city name'),
      }),
      execute: async ({ location }) => {
        return `The weather in ${location} is sunny, 22°C.`;
      },
    }),
  },
});

console.log(result.text);
console.log(result.toolCalls);

Known limitation: mistralai/mistral-medium-2505 has a wx.ai-side streaming bug for tool calls — the model generates tokens but they never reach the client. Use openai/gpt-oss-120b, meta-llama/llama-3-3-70b-instruct, or ibm/granite-4-h-small for streaming tool-call workloads. Non-streaming generateText with mistral-medium works fine.

Image input (vision)

Vision-capable models accept https image URLs, data URLs, and Uint8Array directly:

const { text } = await generateText({
  model: watsonx('meta-llama/llama-3-2-11b-vision-instruct'),
  messages: [{
    role: 'user',
    content: [
      { type: 'text', text: 'Describe this image.' },
      { type: 'image', image: 'https://example.com/image.jpg' },
    ],
  }],
});

Text embeddings

import { embedMany } from 'ai';
import { watsonx } from 'watsonx-ai-provider';

const { embeddings } = await embedMany({
  model: watsonx.embeddingModel('ibm/granite-embedding-107m-multilingual'),
  values: ['First document', 'Second document'], // up to 100 per call
});
// `embed()` works for single inputs.

Available embedding models include ibm/granite-embedding-107m-multilingual and ibm/slate-125m-english-rtrvr-v2.

Generation parameters

Standard generation parameters (temperature, topP, topK, maxOutputTokens, stopSequences) go on the generateText/streamText call, not the model factory. See AI SDK call options for the full list.

watsonx-specific options

wx.ai-only knobs go through providerOptions.watsonx:

await generateText({
  model: watsonx('openai/gpt-oss-120b'),
  providerOptions: {
    watsonx: {
      timeLimit: 30000,            // server-side wall-clock cap (ms)
      parallelToolCalls: false,    // disable concurrent tool calls
      reasoningEffort: 'high',     // scales chain-of-thought depth on
                                   // reasoning models. Verified on
                                   // openai/gpt-oss-120b: HIGH produces
                                   // ~3× the reasoning of LOW.
    },
  },
  prompt: '...',
});

These are validated via the exported watsonxLanguageModelOptions zod schema if you want to pre-validate at your call site.

JSON / structured output

For structured output, the idiomatic AI SDK API is generateObject:

import { generateObject } from 'ai';
import { watsonx } from 'watsonx-ai-provider';
import { z } from 'zod';

const { object } = await generateObject({
  model: watsonx('openai/gpt-oss-120b'),
  schema: z.object({
    title: z.string(),
    summary: z.string(),
    tags: z.array(z.string()),
  }),
  prompt: 'Summarize this article...',
});

console.log(object); // typed as inferred from schema

This compiles down to a responseFormat request on the model. If you need direct control at the lower level, the provider also honors responseFormat on generateText/streamText calls:

await generateText({
  model: watsonx('openai/gpt-oss-120b'),
  responseFormat: { type: 'json' },              // free-form JSON
  // or with a schema:
  responseFormat: { type: 'json', schema: yourZodSchema, name: 'Result' },
  prompt: 'Return a JSON object describing ...',
});

Models

Pass any chat model ID available in your watsonx.ai project:…

Description from the npm listing.

  • ai
  • vercel
  • sdk
  • watsonx
  • ibm
  • granite
  • llama
  • mistral
  • llm
  • language-model
  • embeddings
  • tool-calling
  • function-calling
  • streaming
  • ai-sdk
  • provider

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

watsonx-ai-provider weekly downloads on npm, last 90 days: 445 weekly downloads as of Oct 18, 2026.watsonx-ai-providerWeekly downloads on npm · Last 90 days445downloads / week400420440460480500Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekOct 18, 2026 – Oct 18, 2026 · 1 observations · Updated Oct 18, 2026pluginstats.com
watsonx-ai-provider weekly downloads on npm, last 90 days: 445 weekly downloads as of Oct 18, 2026.

7/30/90-day growth

watsonx-ai-provider weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.watsonx-ai-providerWeekly downloads growth on npm445downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
watsonx-ai-provider weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

watsonx-ai-provider npm ranking history: currently #1600 (by weekly downloads).watsonx-ai-providernpm ranking · by weekly downloads · Last 90 days#1600current rank#1565#1570#1575#1580#1585#1590#1595#1600#1605Jul 23Aug 7Aug 22Sep 6Sep 21Oct 6Oct 21rankOct 20, 2026 – Oct 21, 2026 · 2 observations · Updated Oct 18, 2026pluginstats.com
watsonx-ai-provider npm ranking history: currently #1600 (by weekly downloads).

Listing placement

All npm2,422 listings · 122 pages · 1,213 shown · page 83, #10 (overall #1,650)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs270 listings · 14 pages · page 10, #4 (overall #184)
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 (1)
Recent weekly downloads observations for watsonx-ai-provider
Date (UTC)Weekly downloadsChange vs. previous
445—

Similar npm AI SDKs plugins

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