OpenCodex: Transform Your Machine into a Local OpenAI API Proxy with Ease

September 19, 2026
OpenCodex: Transform Your Machine into a Local OpenAI API Proxy with Ease
  • Opencodex configures a local proxy that intercepts requests from Codex/OpenAI interfaces and routes them to configured local or external model providers, effectively bringing local models into the ChatGPT ecosystem.

  • Using the ChatGPT Desktop app, the author runs local and open-source LLMs alongside OpenAI models via opencodex, which proxies ChatGPT Desktop to include non-OpenAI models.

  • Opencodex acts as an OpenAI API fake on the user’s machine, implemented as a proxy rather than a fork of the ChatGPT app, ensuring compatibility with multiple local runtimes and models.

  • Model compatibility and tool calls vary by model, with some like MiniMax M3 struggling with Codex-style tool calls while others such as GLM-5.3 Flash and Qwen 3.8 27B work well.

  • Practical caveats and recommendations include starting with GLM or Qwen before trying other models, and restarting the ChatGPT app after setup to apply changes.

  • Four caveats are noted: Codex tool calls may differ across models, some web searches may route through OpenAI servers unless the backend is configured, image reading for text-only models may be proxied to OpenAI, and users should verify provider terms for proxy usage.

  • Setup is summarized in two commands (npm install -g @bitkyc08/opencodex and ocx start) with Bun runtime included, plus an optional ocx init to auto-configure providers.

  • The installation is straightforward, using npm, with an optional guided ocx init that configures base URLs and model providers for runtimes like Ollama, vLLM, and LM Studio.

  • Web searches and vision/integration behavior can route through OpenAI servers or configured backends depending on the model, with the setup enabling flexible backends such as Anthropic, xAI, Gemini, and Exa for search.

  • OpenCodex supports multiple runtimes on standard ports (including Ollama, vLLM, LM Studio) and aims for compatibility with any OpenAI-compatible API or Anthropic Messages API, with official materials listing over 40 providers.

  • In practice, opencodex offers a seamless, user-friendly way to experiment with local LLMs inside the Codex app, noting that some models may require tool-calling adjustments.

  • A dashboard at localhost:10100 lets users manage providers, models, accounts, tokens, API calls, and estimated costs, and it can manage multiple ChatGPT/Codex accounts for quota control.

Summary based on 2 sources


Get a daily email with more Tech stories

Sources

More Stories