Codex CLI was built to run OpenAI models. opencodex is a lightweight local proxy that lets you route it to Claude, Gemini, Grok, DeepSeek, Ollama, or any of 40-plus providers without waiting for upstream support.
Codex CLI was built to run OpenAI models. opencodex is a lightweight local proxy that lets you route it to Claude, Gemini, Grok, DeepSeek, Ollama, or any of 40-plus providers without waiting for upstream support.
opencodex is a local proxy that translates OpenAI Codex's Responses API into whatever protocol your chosen provider speaks. It sits between Codex (or Claude Code, or GitHub Copilot App) and the model you want to use, handling streaming, tool calls, reasoning tokens, and image inputs in both directions.
The proxy supports over 40 built-in providers with five protocol adapters, including Anthropic, Google, xAI, Kimi, Ollama, DeepSeek, GLM, and any OpenAI-compatible endpoint. Models are auto-discovered via the /v1/models endpoint, so once you add a provider, the available models populate automatically. It runs natively on macOS, Linux, and Windows.
Beyond routing, opencodex also manages a pool of ChatGPT accounts for Codex, handling quota tracking, cooldown, failover, and session affinity.
The proxy acts as a translator. Codex speaks the Responses API format. Your provider speaks its own protocol (Anthropic Messages, Google Gemini, OpenAI Chat, etc.). opencodex sits in the middle, translating bidirectionally.
Model selection uses a provider/model syntax. For example, codex -m "anthropic/claude-opus-5" routes to Claude through Anthropic. codex -m "google/gemini-3-pro" routes to Gemini through Google. codex -m "ollama/llama3" routes to a local model through Ollama. Each command lights up the corresponding provider in the dashboard as it runs.
The account pool feature tracks 5-hour, weekly, and 30-day quota bars per ChatGPT account. Existing sessions keep affinity to their original account. New sessions auto-route to the lowest-usage healthy account. When an account hits a 429 rate-limit error, it enters cooldown and traffic fails over to the next healthy option.
You still need credentials for each provider. opencodex does not provide free LLM access. You need an API key or OAuth login for Anthropic, Google, xAI, or whichever provider you choose.
Quality depends entirely on the model you select, not the proxy. If Claude Opus produces better reasoning than Gemini for your task, that is a model difference, not something opencodex changes.
Cursor native local execution is disabled by default because it bypasses Codex's sandbox. Only enable it in a trusted environment.
opencodex is for developers who like Codex CLI or Claude Code as a harness but want the freedom to choose any LLM provider. If you are locked into one model because your tool only supports one provider, opencodex removes that constraint. If you already have a stable single-provider setup that works well, the value is lower.
The takeaway: opencodex turns Codex and Claude Code into a gateway to any LLM. It is a small tool that solves a specific bottleneck, and for developers who want provider flexibility inside their existing coding agent, it hits the right spot.