This is an early release preview. You may encounter bugs.
OpenCodex logo
Unclaimed

Tool coding

OpenCodex

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

A 87/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
No votes yet

01 / About

What OpenCodex is.

Opencodex is a local proxy that translates the Responses API used by OpenAI Codex into the request format of another model provider, in both directions: streaming, tool calls, reasoning tokens, and images. It lets Codex (CLI, app, and SDK), Claude Code, Claude Desktop, and Grok Build run on models from Anthropic, Google, xAI, GLM, DeepSeek, Kimi, Qwen, Ollama, or any OpenAI-compatible endpoint, while each client keeps its own native interface.

The proxy listens on localhost (port 10100 by default) with a web dashboard for adding providers, choosing models, and managing accounts. A request targets a model with the provider/model syntax, for example codex -m "anthropic/claude-opus-5"; omitting the prefix uses the default provider or matches by model-name pattern. Combos define one virtual model id with failover or weighted round-robin across providers, and routed models can appear in the Codex sub-agent picker with fallback chains.

For Codex authentication it manages a pool of ChatGPT accounts. Quotas (5-hour, weekly, 30-day) refresh in the dashboard, new sessions route to the lowest-usage healthy account under quota routing (round-robin and fill-first are the other policies), and existing threads stay pinned to the account that started them unless failover, account exclusion, affinity expiry, or 401/403 and 429 recovery rebinds them. Pooling is described as a routing and resilience mechanism that does not guarantee protection from provider rate limits or account actions, and the project notes that some providers may restrict accounts that route traffic through third-party proxies.

Credentials can come from OAuth (xAI, Anthropic, Kimi), a forwarded codex login, a pasted key, or ${ENV_VAR} references. Non-OpenAI models get web search and image understanding through a sidecar over the ChatGPT login. The proxy runs on macOS, Linux, and Windows (Node 18+ with a bundled Bun runtime) as a foreground process, a background service (launchd, systemd user unit, Task Scheduler), or an on-demand shim that starts whenever codex launches. Binding beyond loopback requires a bearer token, and ocx stop restores Codex to its original configuration.

Features

  • Protocol translation: converts the Codex Responses API to and from each provider format, including streaming, tool calls, reasoning tokens, and images
  • Provider catalogue: 40+ built-in providers (OpenAI, Anthropic, Google Gemini, xAI, Kimi, Azure OpenAI, Ollama, DeepSeek, Groq, OpenRouter, Together, Fireworks, Cerebras, Mistral, Hugging Face, NVIDIA NIM, MiniMax, Qwen Cloud, SiliconFlow) plus any OpenAI-compatible endpoint
  • Model routing: provider/model ids, default-provider fallback, and name-pattern auto-matching
  • Combos: one virtual model id with failover or weighted round-robin across providers
  • Sub-agents on any model: routed models exposed in the Codex sub-agent picker with v1/v2 surface control and fallback chains
  • Account pool: thread affinity, quota-aware switching, cooldown, selection order, and fail-closed auth handling for ChatGPT accounts
  • Sidecars: web search and vision for models that lack them, served over the ChatGPT login
  • Dashboard: providers, OAuth status, model selection, and a live request log with cache token counts
  • Bounded memory: every long-lived cache and buffer has a cap or byte budget (default 256 MiB), inspectable via GET /api/system/memory

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

03 / Build

Build with OpenCodex.

Browse the catalogue for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get OpenCodex →

Browse the catalogue