AI SDK Provider for OpenAI Codex CLI
JSON →The `ai-sdk-provider-codex-cli` package offers a community-maintained integration for Vercel's AI SDK v6, enabling access to OpenAI's Codex CLI and its GPT-5 class models (e.g., `gpt-5.1`, `gpt-5.2`, `gpt-5.3-codex`, `gpt-5.2-codex-max`) using an existing ChatGPT Plus/Pro subscription. Currently at version 1.1.0, the library is actively developed, with recent releases focusing on AI SDK v6 compatibility and new features like the `createCodexAppServer` persistent JSON-RPC client. It provides two primary modes: `codexExec` for a new process per call, and `createCodexAppServer` for a long-lived process with advanced session controls like `injectMessage` and `interrupt`. This Node-only provider works with `generateText`, `streamText`, and `generateObject` functions, and authenticates via `codex login` or `OPENAI_API_KEY`. Its key differentiator is leveraging the local Codex CLI for direct, granular control over model execution and sandboxing, providing an alternative to direct API integrations for users with existing ChatGPT subscriptions.
Traffic · last 30 days ↓73% vs prev 7d
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · NZ