Skip to content
PluginStats

@ai-sdk/code-mode weekly downloads statistics

By ai-sdk (3 listings) · npm · AI SDKs

QuickJS-backed code mode tool for AI SDK

View on npm Fresh · Dec 6, 2026

@ai-sdk/code-mode has 356,808 recorded weekly downloads on npm, an increase of 135% over the past 30 days, ranking #444 of 3,247 tracked listings.

Weekly downloads
356,808
Official API · Dec 5, 2026
7-day growth
+58.0%
+131K weekly downloads
30-day growth
+135%
+204.9K weekly downloads
90-day growth
+1226%
+329.9K weekly downloads
Rank
#444
▲ 50 in 7 days

About @ai-sdk/code-mode

AI SDK - Code Mode

@ai-sdk/code-mode lets models write JavaScript or TypeScript that calls your AI SDK tools. The code runs in an isolated QuickJS sandbox and returns a JSON-serializable value.

Setup

npm i ai @ai-sdk/code-mode zod

Usage

import {
  DIRECT_TOOL_CALL,
  experimental_codeModeTool as codeModeTool,
} from '@ai-sdk/code-mode';
import { generateText, isStepCount, tool } from 'ai';
import { z } from 'zod';

const getInventory = tool({
  description: 'Get available inventory for a product.',
  inputSchema: z.object({ productId: z.string() }),
  outputSchema: z.object({
    productId: z.string(),
    availableUnits: z.number(),
  }),
  execute: async ({ productId }) => ({
    productId,
    availableUnits: 42,
  }),
});

const getDemand = tool({
  description: 'Get requested units for a product.',
  inputSchema: z.object({ productId: z.string() }),
  outputSchema: z.object({
    productId: z.string(),
    requestedUnits: z.number(),
  }),
  execute: async ({ productId }) => ({
    productId,
    requestedUnits: 31,
  }),
});

const tools = {
  code_mode: codeModeTool({
    executionPolicy: {
      timeoutMs: 30_000,
    },
  }),
  getInventory,
  getDemand,
} as const;

const result = await generateText({
  model,
  tools,
  experimental_toolCallers: {
    getInventory: ['code_mode', DIRECT_TOOL_CALL],
    getDemand: ['code_mode'],
  },
  stopWhen: isStepCount(10),
  prompt: 'Compare inventory and demand for product sku_123.',
});

See the Code Mode documentation for more information.

Description from the npm listing.

  • ai
  • ai-sdk
  • agents
  • code-mode
  • quickjs
  • sandbox
  • tools

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/code-mode weekly downloads on npm, last 90 days: 356,808 weekly downloads as of Dec 5, 2026, +1226% over 90 days.@ai-sdk/code-modeWeekly downloads on npm · Last 90 days356,808downloads / week+1226% over 90 days050K100K150K200K250K300K350K400KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@ai-sdk/code-mode weekly downloads on npm, last 90 days: 356,808 weekly downloads as of Dec 5, 2026, +1226% over 90 days.

7/30/90-day growth

@ai-sdk/code-mode weekly downloads growth on npm: +58.0% over 7 days, +135% over 30 days, +1226% over 90 days.@ai-sdk/code-modeWeekly downloads growth on npm356,808downloads / week now7-day growth+131,047 weekly downloads+58.0%30-day growth+204,860 weekly downloads+135%90-day growth+329,893 weekly downloads+1226%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@ai-sdk/code-mode weekly downloads growth on npm: +58.0% over 7 days, +135% over 30 days, +1226% over 90 days.

Ranking history

@ai-sdk/code-mode npm ranking history: currently #444 (by weekly downloads).@ai-sdk/code-modenpm ranking · by weekly downloads · Last 90 days#444current rank#200#300#400#500#600#700Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
@ai-sdk/code-mode npm ranking history: currently #444 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 23, #4 (overall #444)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 2, #3 (overall #23)
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 (592)
Recent weekly downloads observations for @ai-sdk/code-mode
Date (UTC)Weekly downloadsChange vs. previous
356,808+19.5K
337,281+44.5K
292,741+33.5K
259,271+18K
241,318+4.9K
236,413+7.5K
228,959+3.2K
225,761+2.9K
222,880-29.6K
252,501-44K
296,544-13.5K
310,079+6.5K
303,539+2.2K
301,362—

Similar npm AI SDKs plugins

All 20 @ai-sdk/code-mode 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/code-mode. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.