@ai-sdk/code-mode has 33,508 recorded weekly downloads on npm, a decrease of 16.8% over the past 30 days.
It ranks #642 of 2,256 tracked npm listings by weekly downloads.
PluginStats has 543 daily observations since Apr 23, 2025; the latest is from Oct 17, 2026.
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.
Use code mode when a model needs to call several tools, transform their results, or run them concurrently. Only the tools you provide are available to the generated code.
Installation
This package runs on the server and requires Node.js 22.13 or newer.
Usage
The model can then generate code like:
Direct Execution
Use experimental_runCodeMode to run code directly:
Description from the npm listing.
- ai
- ai-sdk
- agents
- code-mode
- quickjs
- sandbox
- tools
Where @ai-sdk/code-mode 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/@ai-sdk/code-mode. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.