opencodex
A local AI gateway connects Codex and Claude Code to Ollama or cloud providers, with shared model selection and routing across providers.

opencodex is a local AI gateway for developers who want to choose which models power their coding assistants. It connects Codex, Claude Code, Claude Desktop and Grok Build to alternative providers while keeping each tool's native interface.
- Model choice: Use local Ollama models or providers such as Anthropic, Google Gemini, DeepSeek and OpenRouter, plus OpenAI-compatible endpoints.
- Coding tool integration: Routed models appear in the Codex App and Claude Code model pickers, and managed configurations connect tools including OpenCode and Cline.
- Routing and sub-agents: Combine providers with automatic failover or weighted routing, and assign routed or native models to Codex sub-agents.
- Account connections: Connect through API keys or supported account logins, and pool ChatGPT accounts while keeping existing threads attached to their original account.
- Request visibility: A web dashboard shows provider connections, model selection and live request logs, including cache token counts.
The gateway runs on macOS, Windows and Linux and is open source under the MIT license. Local routing doesn't make cloud models local: requests go to the provider you select, while Ollama supports a local backend. Streaming, tool calls, reasoning and images depend on the chosen model. Optional search and image-understanding sidecars use a cloud model through your ChatGPT login.