Model or dataset
lidge-jun/opencodex avatar
lidge-jun/opencodex

OpenCodex: A Local Proxy That Lets Codex and Claude Code Run Any LLM

Universal provider proxy for OpenAI Codex & Claude Code, use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code.

14,746 stars1,110 forksTypeScriptMIT

At a glance

What is it?
OpenCodex is a TypeScript-based local proxy that translates OpenAI's Responses API into the native formats of 40+ providers, letting Codex, Claude Code, Claude Desktop, and Grok Build use models like Gemini, DeepSeek, or Ollama. It also manages ChatGPT account pools for Codex auth, but its approach comes with real trade-offs.
Who is it for?
Adopt OpenCodex if you want to break the model lock-in of Codex or Claude Code without leaving their native UIs, and if you are comfortable running a local proxy with bundled Bun and managing provider credentials yourself. Skip it if you cannot accept the risk of account pooling for ChatGPT/Codex auth, or if your organization forbids third-party proxies for security or compliance reasons.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What OpenCodex Actually Fixes

The proxy listens on localhost:10100 and exposes a web dashboard for configuration. You add providers either from 40+ built-ins or any OpenAI-compatible endpoint, pick models, and manage accounts. The dashboard is also where you configure the ChatGPT account pool for Codex auth. The proxy itself is a Node.js application, but the Bun runtime is bundled automatically on npm install, so you do not need to install Bun separately. This is a deliberate choice to reduce setup friction, but it also means the npm package carries a runtime dependency that might surprise users who expected a pure Node tool.

The Two-Command Setup and Its Hidden Details

The quick start is genuinely short: `npm install -g @bitkyc08/opencodex` and then `ocx start`. That starts the proxy and dashboard on localhost:10100. For background operation, `ocx service` runs it as a service, and `ocx gui` reopens the dashboard. For agents, there is `ocx init`, which runs an interactive setup that writes `~/.opencodex/config.json` and wires Codex. The README is careful to note that `ocx init` never starts the proxy, and that headless commands like `ocx provider add` and `ocx combo set` talk to the live proxy and exit nonzero if it is unreachable. That means order matters: start the proxy before running those commands. The README also mentions a specific agent-related detail: an interactive `ocx start` may ask once whether to star the repository, but the CLI suppresses that prompt for agent-driven runs, and the API refuses such requests with a `403 agent_consent_required`. That is a thoughtful guard, but it also means agents must read `AGENTS_INSTALL.md` to avoid surprises.

Account Pooling: The Feature That Carries Real Risk

One of the most distinctive features is the ChatGPT account pool for Codex auth. You can add multiple ChatGPT or Codex accounts, refresh their 5-hour, weekly, and 30-day quotas in the dashboard, and then let new sessions auto-route to the lowest-usage healthy account. Existing threads retain affinity to the account that started them, so long-running SSH, tmux, or mobile sessions do not jump accounts mid-conversation. However, the README lists conditions that can rebind threads: quota re-evaluation, failover, account exclusion, affinity expiry, or 401/403 and 429 recovery. That is a lot of ways for a session to switch accounts, which could be jarring if you expect a single identity per conversation. The README also includes a provider-policy note that explicitly says account pooling is for routing and operational resilience only, and does not guarantee protection from provider rate limits, enforcement, suspension, or other account actions. It also says OpenCodex does not endorse using additional accounts to circumvent provider limits or sharing credentials. This is a clear warning that the feature exists but carries provider-relations risk. If you are an enterprise user, account pooling might be a non-starter due to terms of service concerns. The README also mentions a selection order so that a specific account, like a Codex Desktop login, is only reached after others are drained. That is a useful control, but it adds configuration complexity.

Combos and Sub-Agent Routing: Where the Proxy Gets Smart

Beyond simple translation, OpenCodex offers 'combos', which are virtual model IDs that route requests across providers with failover or weighted round-robin. This is useful if you want a fallback chain: if one provider is down or rate-limited, the next in the combo takes over. The README references a combo guide, but the exact configuration syntax is not shown in the provided material. Similarly, it supports 'feature routed models' in Codex's sub-agent picker, with v1/v2 surface control and fallback chains. That means you can have a main model like Opus handle a task, then delegate to a GPT-5.6 Sol subagent, as the README's example shows for Claude Desktop. This is a different level of control than a simple proxy; it is orchestrating which model handles which part of a conversation. The trade-off is that these features add a layer of abstraction that can be hard to debug. If a combo fails, you need to understand the routing policy to see why. The README does not provide a detailed failure log format, so you may need to inspect the dashboard or logs manually.

Platform Support and Service Management

The README lists macOS (arm64 and x64) as fully supported with launchd, Linux (x64 and arm64) with systemd user units, and Windows (x64) with Task Scheduler or an opt-in native service using `--native` and WinSW. It requires Node 18+, and the Bun runtime is bundled on npm install, so no separate Bun install is needed. On Windows, the README claims no WSL is needed, which is a notable convenience for Windows users who often have to deal with WSL for such tools. However, the README also notes that if npm blocked the bundled runtime's install scripts, you need to check the installation docs. That implies a potential failure mode where the bundled runtime does not install correctly due to npm's script-blocking policies. The service manager integration is a concrete benefit: you can run the proxy as a background service and have it auto-start, which is essential for long-running use with Codex or Claude Code. But the README does not provide details on how to uninstall the service or how to handle service failures, so you may need to rely on the documentation site.

Limitations and the Wrong Tool Cases

OpenCodex is not a magic bullet. It is a local proxy, so it must be running whenever you use Codex or Claude Code with a non-native model. If the proxy crashes or is stopped, your tools will fail to connect. The README does not mention any high-availability or auto-restart features beyond the service managers. Also, the proxy adds a hop between the client and the provider, which could introduce latency, though the README does not quantify it. For users who only use OpenAI models with Codex, the proxy is unnecessary overhead. For users who need strict compliance with provider terms, the account pooling feature is a red flag; even though the README disclaims endorsement of circumvention, the very existence of the feature could be a problem in regulated environments. Another limitation is that the README does not specify how the proxy handles provider-specific features like Anthropic's computer use or Gemini's grounding, so if you rely on those, you need to test. The README says it handles streaming, tool calls, reasoning tokens, and images, but it does not guarantee feature parity across all providers. The version numbers show a rapid release cycle, with v2.34, v2.35, and v2.36.0-preview all within three days, which suggests active development but also a moving target. Upgrading frequently might be necessary to get fixes, but it also means you need to watch for breaking changes.

Alternatives and How They Differ

The main alternative to OpenCodex is using a provider's own native client or a direct API integration. For example, you could use the official Claude Code with an Anthropic API key, or use Codex with an OpenAI key, and skip the proxy entirely. That is the simplest approach, but it locks you into one provider. Another alternative is to use a generic API gateway like LiteLLM, which also provides a proxy to route requests to multiple providers. The difference is that LiteLLM is a more general-purpose tool that supports many LLM APIs and SDKs, but it does not specifically translate the Responses API into the exact format that Codex or Claude Code expects. You would need to configure the client to point to LiteLLM's endpoint, but you might lose the native UI integration that OpenCodex preserves. OpenCodex's edge is that it is purpose-built for these specific clients, so the dashboard and the account pool are tailored to Codex and Claude Code. If you only need to switch providers occasionally and do not need account pooling, a simpler proxy or direct API calls might be less complex. The README does not compare itself to other proxies, so you would need to evaluate them separately.

Maintenance, Upgrade Cost, and License

The project is MIT-licensed, which means you can use, modify, and distribute it freely, but you get no warranty. The maintenance cost is tied to the rapid release cadence: with three releases in three days, you will likely need to update often to get bug fixes and new features. The README mentions that the source install runs the latest dev branch and includes 'memory ownership patches, runtime GC improvements, and unreleased fixes' that are not yet in the npm package. That suggests the npm package lags behind the dev branch, so if you want the latest fixes, you might need to build from source. That is an extra cost: cloning the repo, installing with Bun, and running from source. The README also says that the CLI may ask to star the repository during interactive install, which is a minor but unusual prompt. For agents, the API enforces a 403 for consent-related actions, which is a good guard but adds a rule to remember. There is no mention of a migration guide or changelog in the provided material, so you would need to check the releases page for each version. The license implications are straightforward: MIT allows commercial use, but you are responsible for how you use the proxy, especially the account pooling feature, which may violate provider terms if misused.

Editorial conclusion

Adopt OpenCodex if you want to break the model lock-in of Codex or Claude Code without leaving their native UIs, and if you are comfortable running a local proxy with bundled Bun and managing provider credentials yourself. Skip it if you cannot accept the risk of account pooling for ChatGPT/Codex auth, or if your organization forbids third-party proxies for security or compliance reasons. Before adopting, verify the current version's handling of streaming, tool calls, and reasoning tokens against your primary provider, test the combo failover behavior with your actual workloads, and read the provider-policy note about account actions and terms of use. The project's rapid release cadence (v2.34 to v2.36 within days) means you should pin a specific version and review changes before upgrading.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Community notes

Community notes