{"id":17318,"library":"opencode-openai-codex-auth","title":"OpenCode OpenAI Codex Authentication Plugin","description":"This package provides an authentication plugin for the OpenCode AI platform, enabling users to leverage their existing ChatGPT Plus/Pro subscriptions with the OpenAI Codex backend instead of consuming API credits. The current stable version is 4.4.0, and the project demonstrates a very active release cadence with multiple minor and patch releases in quick succession, indicating ongoing development and maintenance. Key differentiators include a simplified one-command installer (`npx opencode-openai-codex-auth@latest`), comprehensive support for various GPT-5.x and Codex model families (including GPT-5.2 Codex), and an official OAuth flow for seamless integration. It handles multimodal input and automatically manages token refresh, aiming to provide a 'one config, every model' philosophy for OpenCode users. It is designed primarily for personal development use, with a warning against production or multi-user applications.","status":"active","version":"4.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/numman-ali/opencode-openai-codex-auth","tags":["javascript","opencode","openai","codex","chatgpt","oauth","gpt-5","plugin","auth","typescript"],"install":[{"cmd":"npm install opencode-openai-codex-auth","lang":"bash","label":"npm"},{"cmd":"yarn add opencode-openai-codex-auth","lang":"bash","label":"yarn"},{"cmd":"pnpm add opencode-openai-codex-auth","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This package is an authentication plugin designed to extend the functionality of the OpenCode AI platform.","package":"@opencode-ai/plugin","optional":false}],"imports":[{"note":"While this package ships TypeScript types, its primary interaction method for end-users is via CLI commands (`npx`, `opencode`), not direct programmatic imports. This symbol represents the likely main plugin class for integration within the OpenCode framework itself.","symbol":"OpenAICodexAuthPlugin","correct":"import { OpenAICodexAuthPlugin } from 'opencode-openai-codex-auth';"},{"note":"This type likely defines the configuration options for the OpenCode OpenAI Codex authentication plugin, used when configuring the plugin within the OpenCode ecosystem or for advanced development. Direct programmatic configuration by end-users is not the primary use case, which focuses on CLI-driven setup.","symbol":"IOpenAICodexAuthOptions","correct":"import type { IOpenAICodexAuthOptions } from 'opencode-openai-codex-auth';"},{"note":"Although the primary interaction is via `npx` to run the installer script, this path might be used for programmatic interaction with the installer's underlying logic, perhaps for testing or custom setup automation. For typical use, the `npx` command is preferred.","symbol":"Installer","correct":"import { Installer } from 'opencode-openai-codex-auth/installer';"}],"quickstart":{"code":"npx -y opencode-openai-codex-auth@latest\n\nopencode auth login\nopencode run \"write hello world to test.txt\" --model=openai/gpt-5.2 --variant=medium\n\n# For legacy OpenCode (v1.0.209 and below):\nnpx -y opencode-openai-codex-auth@latest --legacy\nopencode run \"write hello world to test.txt\" --model=openai/gpt-5.2-medium","lang":"bash","description":"This quickstart demonstrates the one-command installation and subsequent authentication and model usage with the OpenCode CLI."},"warnings":[{"fix":"Update all configurations to use GPT-5.1 model identifiers. Refer to `config/full-opencode.json` for the officially supported configuration structure.","message":"The plugin enforced GPT 5.1 model identifiers, deprecating and removing legacy GPT 5.0 models. Existing configurations using GPT-5.0 model names will break.","severity":"breaking","affected_versions":">=3.3.0"},{"fix":"Switch all references from `gpt-5.0` to `gpt-5.1` in your OpenCode commands and configurations, specifically updating model presets.","message":"Version 4.0.0 migrated all GPT-5.0 models to GPT-5.1. This change requires users to update their model references in configurations and commands.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Avoid setting `reasoning_effort: \"none\"` for Codex variants. If faster responses are desired, use other reasoning effort levels or non-Codex GPT models that support 'none'.","message":"Codex variants (Codex, Codex Max, Codex Mini) do NOT support `reasoning_effort: \"none\"`. Attempting to set this will auto-convert it to 'low' for Codex/Codex Max, or 'medium' for Codex Mini.","severity":"gotcha","affected_versions":">=4.1.1"},{"fix":"For production or multi-user applications, utilize the official OpenAI Platform API directly instead of this plugin to ensure proper scalability and credential management.","message":"This plugin is strictly for personal development use with your own ChatGPT Plus/Pro subscription. It is not intended for production or multi-user applications.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"Upgrade to version 4.0.2 or newer, which contains fixes for agent creation failing and correct handling of SSE/JSON responses.","cause":"The `/agent create` command failed due to issues in handling SSE/JSON responses or overly aggressive filtering of tool calls during compaction.","error":"Invalid JSON response"},{"fix":"Upgrade to version 4.0.1 or newer. This version fixes the compaction context loss by only filtering orphaned outputs (without matching calls), preserving matched pairs for context.","cause":"The plugin was aggressively filtering out `function_call` and `function_call_output` items, even when tools were present, leading to orphaned `function_call_output` errors.","error":"400 errors during summary/compaction requests when OpenCode sends item_reference pointers to server-stored function calls"},{"fix":"Upgrade to version 4.0.1 or newer, which includes a fallback mechanism to handle GitHub API rate limiting.","cause":"Frequent requests to GitHub for Codex instructions could trigger API rate limits, causing failures in fetching necessary data.","error":"GitHub API rate limiting when fetching Codex instructions"}],"ecosystem":"npm","meta_description":null}