Tools
opencodex — a local proxy that runs Codex on other models
opencodex sits in front of Codex and Claude Code and translates requests for Claude, Gemini, Grok, DeepSeek and Ollama. How it works and when it helps.
opencodex is a local proxy that sits in front of OpenAI Codex and Claude Code. It accepts the Responses API requests Codex sends, converts them into the API format of models like Claude, Gemini, Grok, DeepSeek or Ollama, and turns the streamed replies, tool calls and reasoning back into what Codex expects. Codex itself is never patched.
Why it exists
Codex is very good at planning, calling tools and handling long context. But you could only pick OpenAI models. I wanted to keep the way Codex works and change only the model — some jobs go better on another lab’s model, and some days a subscription limit runs out first.
There were two ways to do that: fork Codex, or put a translator in front of it. A fork has to chase upstream on every release. So I built the translator.
How it works
Codex sends requests to the address in its config. opencodex points that address at http://127.0.0.1:<port> and takes the requests.
- Accept — one port accepts Responses, Anthropic Messages and OpenAI Chat Completions requests.
- Route — routing rules decide which provider gets the request. If you pooled several ChatGPT accounts, it checks 5-hour and weekly usage and sends new sessions to the account with headroom.
- Translate — the request becomes whatever that provider understands, and the reply becomes the event stream Codex expects again. Tool calls, images and reasoning blocks are reconciled here.
Every provider speaks a slightly different dialect of these APIs. Some keep no state; some have strict decoders that reject JSON that is only slightly off. A large share of opencodex commits is about reconciling those differences one by one.
Install
npm install -g @bitkyc08/opencodex
ocx start
ocx start opens a local dashboard where you connect providers and set routing. Full docs are at opencodex.me.
When to use it
- You like the Codex workflow and want to run the same task on other models
- Your team mixes models but wants a single agent tool
- You want an offline coding agent on local models through Ollama
What running it taught us
opencodex had its first commit in June 2026 and passed 16,000 GitHub stars by September. The number we watch more closely is issue turnaround: measured in September 2026, the last 100 closed issues were closed in about half a day on average. Most users hit problems in environments we cannot see, so the routine is to get reproduction steps first, fix, and answer with a release.
The source is at github.com/lidge-jun/opencodex under the MIT license.
FAQ
Does opencodex modify Codex?
No. The Codex binary is untouched; only the address it sends requests to changes to the local proxy. Stop the proxy and Codex goes back to normal.
Does it work with Claude Code?
Yes. The same local port also accepts Anthropic Messages requests, so Claude Code can use the same proxy.
Where do I get it?
Install the npm package @bitkyc08/opencodex and run ocx start. Documentation lives at opencodex.me.