Skip to content
PluginStats

ai-sdk-provider-codex-cli weekly downloads statistics

By ben-vargas (3 listings) · npm · AI SDKs

AI SDK v7 provider for OpenAI Codex CLI (use ChatGPT Plus/Pro subscription)

View on npm Fresh · Oct 17, 2026

ai-sdk-provider-codex-cli has 13,047 recorded weekly downloads on npm, a decrease of 56.8% over the past 30 days.

It ranks #846 of 2,256 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -93.3%.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
13,047
Official API · Oct 17, 2026
7-day growth
-52.1%
-14.2K weekly downloads
30-day growth
-56.8%
-17.2K weekly downloads
90-day growth
-93.3%
-182K weekly downloads
Rank
#846
Among tracked npm listings

About ai-sdk-provider-codex-cli

AI SDK Provider for Codex CLI

A community provider for Vercel AI SDK v7 that integrates OpenAI's Codex CLI (for example gpt-6-astra) using your ChatGPT Plus/Pro subscription. Available model slugs follow whatever your installed Codex CLI exposes — use listModels() / provider.listModels() to discover them.

This package ships two provider modes:

• codexExec: non-interactive codex exec (spawn a new process per call) • codexAppServer: persistent codex app-server JSON-RPC client (shared process, true delta streaming, optional stateful threads) • Works with generateText, streamText, and generateObject • Uses ChatGPT OAuth from codex login (tokens in ~/.codex/auth.json) or OPENAI_API_KEY • Node-only (spawns a local process); supports CI and local dev • Requires Node.js >= 22; published as an ESM-only package • v2.0.0: AI SDK v7 migration with the native LanguageModelV4 provider spec (package line 2.x) • v1.0.0: AI SDK v6 migration with the LanguageModelV3 interface (now on the ai-sdk-v6 tag)

Version Compatibility

| Package line | AI SDK | npm tag | Git branch | Status |

| 2.x | v7 | latest, ai-sdk-v7 | main | Active development | | 1.x | v6 | ai-sdk-v6 | ai-sdk-v6 | Maintenance | | 0.7.x | v5 | ai-sdk-v5 | ai-sdk-v5 | Maintenance / critical fixes | | 0.1.0-ai-sdk-v4 | v4 | ai-sdk-v4 | ai-sdk-v4 | Frozen |

Installation

For AI SDK v7 (default)

1. Install and authenticate Codex CLI

2. Install provider and AI SDK v7

Requirements: Node.js >= 22. This package is ESM-only (no CommonJS build); load it with import (or dynamic import() from CJS).

For AI SDK v6

For AI SDK v5

⚠️ Codex CLI Version: Requires the current stable Codex CLI 0.156.x for full support of both provider modes (codexExec and codexAppServer). This package pins its optional @openai/codex dependency to ^0.156.1, the latest non-alpha release line validated for this release line. gpt-6-sol (used by the examples) is rejected by older CLIs (= 0.139) • persistExtendedHistory: request extended thread history persistence • threadMode: stateless (default) or persistent automatic thread reuse • resume: shorthand to resume an existing thread id • onSessionCreated: receive a session object for injectMessage() / interrupt()

Per-call app-server overrides use providerOptions['codex-app-server'] (for example threadId, threadMode, includeRawChunks, personality, approvalPolicy, sandboxPolicy, serverRequests, configOverrides). Raw chunk emission can also be requested per call with the standard AI SDK v7 option include: { rawChunks: true }.

Additional app-server helpers:

• listModels(): query available models via a temporary app-server process (or use provider.listModels() to query through an existing provider/client) • tool(), createLocalMcpServer(), createSdkMcpServer(): define and expose local MCP tools

Local MCP security defaults:

• createLocalMcpServer() binds to loopback hosts by default and rejects non-loopback host values unless you set allowNonLoopbackHost: true. • createLocalMcpServer() generates a per-server bearer token and expects Authorization: Bearer on direct HTTP calls. The token is available at server.config.bearerToken. • createSdkMcpServer() propagates this auth config automatically, so provider-level MCP wiring works without extra manual headers. • Without cacheKey, SDK MCP server/tool function identity participates in persistent keying to avoid conflating closure-dependent tool behavior. • Use createSdkMcpServer({ cacheKey }) when you intentionally recreate equivalent SDK MCP definitions per call and want stable persistent model reuse.

Model Parameters & Advanced Options

Control reasoning effort, verbosity, and advanced Codex features at model creation time:

Nested override objects are flattened to dotted keys (e.g., the example above emits -c sandbox_workspace_write.network_access=true). Arrays are serialized to JSON strings. MCP server env/header objects flatten the same way (e.g., mcp_servers.docs.http_headers.x-tenant=acme).

Per-call overrides via providerOptions

Override these parameters for individual AI SDK calls using the providerOptions map. Per-call values take precedence over constructor defaults while leaving other settings intact.

Precedence: providerOptions['codex-cli'] > top-level reasoning call option > constructor CodexCliSettings > Codex CLI defaults.

The AI SDK v7 top-level reasoning option ('none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh') maps directly to Codex reasoning effort in both provider modes; provider-specific effort options (reasoningEffort for exec, effort for app-server) win when both are set, and 'provider-default' leaves your configured default untouched. The newer Codex levels 'max' and 'ultra' (Codex CLI >= 0.149, e.g. gpt-6-astra) are not part of the AI SDK union, so set them through the provider-specific options.

App-server per-call overrides use providerOptions['codex-app-server']:

Zod Compatibility

• Peer dependency: zod@^4.1.8 (Zod 4 only; Zod 3 is not supported)

Limitations

• Node ≥ 22, ESM-only, local process only (no Edge) • Codex --experimental-json mode emits events rather than streaming deltas; streaming typically yields a final chunk. The CLI provides the final assistant text in the item.completed event, which this provider reads and emits at the end. • Some AI SDK parameters are unsupported by Codex CLI (e.g., temperature/topP/penalties); the provider surfaces warnings and ignores them

JSON Schema Limitations

⚠️ Important: OpenAI strict mode has limitations:

• Optional fields NOT supported: All fields must be required (no .optional()) • Format validators stripped: .email(), .url(), .uuid() are removed (use descriptions instead) • Pattern validators stripped: .regex() is removed (use descriptions instead)

See LIMITATIONS.md for comprehensive details and migration guidance.

Disclaimer

This is a community provider and not an official OpenAI or Vercel product. You are responsible for complying with all applicable terms and ensuring safe usage.…

Description from the npm listing.

  • ai-sdk
  • codex
  • openai
  • cli
  • language-model
  • gpt-6-sol
  • gpt-6-astra
  • provider

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

ai-sdk-provider-codex-cli weekly downloads on npm, last 90 days: 13,047 weekly downloads as of Oct 17, 2026, -93.3% over 90 days.ai-sdk-provider-codex-cliWeekly downloads on npm · Last 90 days13,047downloads / week-93.3% over 90 days050K100K150K200KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
ai-sdk-provider-codex-cli weekly downloads on npm, last 90 days: 13,047 weekly downloads as of Oct 17, 2026, -93.3% over 90 days.
PNG SVG

7/30/90-day growth

ai-sdk-provider-codex-cli weekly downloads growth on npm: -52.1% over 7 days, -56.8% over 30 days, -93.3% over 90 days.ai-sdk-provider-codex-cliWeekly downloads growth on npm13,047downloads / week now7-day growth-14,209 weekly downloads-52.1%30-day growth-17,166 weekly downloads-56.8%90-day growth-181,962 weekly downloads-93.3%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
ai-sdk-provider-codex-cli weekly downloads growth on npm: -52.1% over 7 days, -56.8% over 30 days, -93.3% over 90 days.
PNG SVG

Ranking history

ai-sdk-provider-codex-cli npm ranking history: currently #846 (by weekly downloads).ai-sdk-provider-codex-clinpm ranking · by weekly downloads · Last 90 days#846current rank#844#845#846#847#848Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 18, 2026 – Oct 19, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
ai-sdk-provider-codex-cli npm ranking history: currently #846 (by weekly downloads).
PNG SVG

Listing placement

All npm2,256 listings · 113 pages · 1,130 shown · page 43, #6 (overall #846)
All npm: every listing in weekly downloads order
PNG SVG

Listing placement

AI SDKs250 listings · 13 pages · page 3, #12 (overall #52)
AI SDKs: every listing in weekly downloads order
PNG SVG

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 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.

Recent observations

Full history (121)
Recent weekly downloads observations for ai-sdk-provider-codex-cli
Date (UTC)Weekly downloadsChange vs. previous
13,047-3.2K
16,225+915
15,310-5K
20,298-4.8K
25,1290
25,129-140
25,269-2K
27,256-1.3K
28,566-2.4K
30,989-1.7K
32,648-1.8K
34,472-6.8K
41,229-1.4K
42,613—

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-provider-codex-cli. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.