Skip to content
PluginStats

@anyr/ai-sdk-provider weekly downloads statistics

By anyr · npm · AI SDKs

The AnyRouter provider for the Vercel AI SDK — call every AnyRouter model through `createAnyRouter`.

View on npm Stale · Oct 18, 2026

@anyr/ai-sdk-provider has 451 recorded weekly downloads on npm, a decrease of 73.0% over the past 30 days, ranking #1595 of 2,391 tracked listings.

Weekly downloads
451
Official API · Oct 18, 2026
7-day growth
-16.3%
-88 weekly downloads
30-day growth
-73.0%
-1.2K weekly downloads
90-day growth
-81.1%
-1.9K weekly downloads
Rank
#1595
Among tracked npm listings

About @anyr/ai-sdk-provider

@anyr/ai-sdk-provider

The AnyRouter provider for the Vercel AI SDK.

Call every model on the AnyRouter gateway through the standard AI SDK interface — generateText, streamText, generateObject, embedMany, generateImage — with one key and one provider.

Install

npm install @anyr/ai-sdk-provider ai zod
# or
pnpm add @anyr/ai-sdk-provider ai zod

Quickstart

import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { generateText } from "ai"

// Reads ANYROUTER_API_KEY from the environment when omitted.
const anyrouter = createAnyRouter()

const { text } = await generateText({
  model: anyrouter("openai/gpt-4o-mini"),
  prompt: "What is AnyRouter?",
})
console.log(text)

Usage

generateText
import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { generateText } from "ai"

const anyrouter = createAnyRouter({ apiKey: process.env.ANYROUTER_API_KEY })

const { text } = await generateText({
  model: anyrouter("anthropic/claude-opus-4-5"),
  system: "You are a helpful assistant.",
  prompt: "Explain the butterfly effect in one paragraph.",
})
streamText
import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { streamText } from "ai"

const anyrouter = createAnyRouter()

const { textStream } = await streamText({
  model: anyrouter("openai/gpt-4o"),
  prompt: "Write a haiku about the ocean.",
})

for await (const chunk of textStream) {
  process.stdout.write(chunk)
}
Reasoning models

Reasoning models (e.g. deepseek/deepseek-r1) return their thinking as a separate stream — the provider surfaces it as the AI SDK's standard reasoning parts, so reasoning/reasoningText and the full-stream reasoning-* parts work out of the box.

import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { generateText } from "ai"

const anyrouter = createAnyRouter()

const { text, reasoningText } = await generateText({
  model: anyrouter("deepseek/deepseek-r1"),
  prompt: "How many r's are in strawberry?",
})

console.log(reasoningText) // the model's chain of thought
console.log(text) // the final answer
generateObject (structured output)
import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { generateObject } from "ai"
import { z } from "zod"

const anyrouter = createAnyRouter()

const { object } = await generateObject({
  model: anyrouter("openai/gpt-4o-mini"),
  schema: z.object({
    title: z.string(),
    summary: z.string(),
    tags: z.array(z.string()),
  }),
  prompt: "Summarise the latest AI news in a structured format.",
})

console.log(object.title, object.tags)
Tool calling
import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { generateText, tool } from "ai"
import { z } from "zod"

const anyrouter = createAnyRouter()

const { text, toolCalls } = await generateText({
  model: anyrouter("openai/gpt-4o"),
  tools: {
    get_weather: tool({
      description: "Get the current weather in a city.",
      parameters: z.object({ city: z.string() }),
      execute: async ({ city }) => ({ temperature: 22, unit: "C", city }),
    }),
  },
  prompt: "What is the weather in Tokyo?",
})
Embeddings
import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { embedMany } from "ai"

const anyrouter = createAnyRouter()

const { embeddings } = await embedMany({
  model: anyrouter.embeddingModel("openai/text-embedding-3-small"),
  values: ["Hello world", "How are you?"],
})

console.log(embeddings[0]) // [0.123, -0.456, ...]
Image generation
import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { generateImage } from "ai"

const anyrouter = createAnyRouter()

const { image } = await generateImage({
  model: anyrouter.imageModel("openai/dall-e-3"),
  prompt: "A serene mountain lake at dawn, oil painting.",
  size: "1024x1024",
})

// image.base64 — base64-encoded PNG or URL depending on the model
Provider options (routing, session, extra body)
import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { generateText } from "ai"

// Set routing preferences at the provider level
const anyrouter = createAnyRouter({
  provider: { only: ["openai"], quantizations: ["bf16"] },
  sessionId: "user-session-abc",
})

// Or override them per-call
const { text } = await generateText({
  model: anyrouter("openai/gpt-4o"),
  prompt: "Hello!",
  experimental_providerMetadata: {
    anyrouter: {
      provider: { order: ["openai", "azure"] },
      sessionId: "per-request-session",
      extraBody: { logprobs: true },
    },
  },
})

Configuration

import { createAnyRouter } from "@anyr/ai-sdk-provider"

const anyrouter = createAnyRouter({
  // API key — falls back to ANYROUTER_API_KEY env var (resolved lazily at request time)
  apiKey: "<your-anyrouter-key>",

  // API base URL — defaults to https://anyrouter.dev/api/v1
  baseURL: "https://anyrouter.dev/api/v1",

  // Extra headers merged into every request
  headers: { "X-Custom-Header": "value" },

  // Custom fetch implementation (e.g. for logging or proxying)
  fetch: myCustomFetch,

  // Default routing preference forwarded as `provider` in the request body
  provider: { only: ["openai"] },

  // Session ID forwarded as `session_id` — useful for grouping in analytics
  sessionId: "my-session",

  // Extra fields merged into every request body (per-call overrides these)
  extraBody: { safe_mode: true },
})

Provider methods…

Description from the npm listing.

  • anyrouter
  • ai-sdk
  • vercel-ai-sdk
  • ai
  • llm
  • openai
  • anthropic
  • language-model
  • 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

@anyr/ai-sdk-provider weekly downloads on npm, last 90 days: 451 weekly downloads as of Oct 18, 2026, -81.1% over 90 days.@anyr/ai-sdk-providerWeekly downloads on npm · Last 90 days451downloads / week-81.1% over 90 days05001K1.5K2K2.5K3K3.5KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 23, 2026 – Oct 18, 2026 · 88 observations · Updated Oc…pluginstats.com
@anyr/ai-sdk-provider weekly downloads on npm, last 90 days: 451 weekly downloads as of Oct 18, 2026, -81.1% over 90 days.

7/30/90-day growth

@anyr/ai-sdk-provider weekly downloads growth on npm: -16.3% over 7 days, -73.0% over 30 days, -81.1% over 90 days.@anyr/ai-sdk-providerWeekly downloads growth on npm451downloads / week now7-day growth-88 weekly downloads-16.3%30-day growth-1,221 weekly downloads-73.0%90-day growth-1,939 weekly downloads-81.1%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
@anyr/ai-sdk-provider weekly downloads growth on npm: -16.3% over 7 days, -73.0% over 30 days, -81.1% over 90 days.

Ranking history

@anyr/ai-sdk-provider npm ranking history: currently #1595 (by weekly downloads).@anyr/ai-sdk-providernpm ranking · by weekly downloads · Last 90 days#1595current rank#400#600#800#1000#1200#1400#1600Jul 23Aug 7Aug 22Sep 6Sep 21Oct 6Oct 21rankOct 17, 2026 – Oct 21, 2026 · 5 observations · Updated Oct 18, 2026pluginstats.com
@anyr/ai-sdk-provider npm ranking history: currently #1595 (by weekly downloads).

Listing placement

All npm2,389 listings · 120 pages · 1,196 shown · page 81, #20 (overall #1,620)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs264 listings · 14 pages · page 9, #19 (overall #179)
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 (544)
Recent weekly downloads observations for @anyr/ai-sdk-provider
Date (UTC)Weekly downloadsChange vs. previous
451+155
296-209
505+27
478-5
483-9
4920
492-47
539+139
400+151
249-92
341-59
400-297
697-348
1,045—

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