Skip to content

Codex Universal Proxy

Use Ollama,OpenRouter, Gemini, cohere and moonshot ai with Codex plugins, MCP tools, tool_search and apply_patch. Use any plugin you want with any OpenAI compatible api.

Install: npm install -g codex-universal-proxy

Works with Codex · 18 GitHub stars

Install

$npm install -g codex-universal-proxy

Install command taken from the project's README or registry entry. Always review code before running it.

Codex Universal Proxy

npm package

Use Ollama, OpenRouter, and other OpenAI-compatible providers with Codex while preserving:

  • Codex plugins
  • MCP tools
  • tool_search
  • apply_patch
  • Image generation tools

The proxy runs locally, translates Codex-specific tool formats into provider-compatible function calls, and converts the responses back into the format Codex expects.

This project is unofficial and experimental. Codex tool formats may change between releases.

Supported Providers and Operating Systems

Built-in provider profiles:

  • Google AI Studio and Vertex AI
  • NVIDIA
  • OpenRouter
  • Anthropic
  • OpenAI
  • Cohere
  • Z.AI
  • Moonshot
  • DeepSeek
  • xAI
  • Ollama

Custom providers are also supported when they expose an OpenAI-compatible Responses API or Chat Completions API.

Supported operating systems:

  • macOS using launchd
  • Linux using a systemd user service
  • Windows using Task Scheduler, with a per-user startup fallback

Install

npm install -g codex-universal-proxy

codex-universal-proxy init
codex-universal-proxy install

Upgrading from codex-ollama-proxy is automatic. The first universal command migrates ~/.codex/ollama-shape-proxy to ~/.codex/codex-universal-proxy, copies legacy catalog/reference files forward, and replaces legacy background-service registrations. If the old runtime path is also a source checkout, only runtime-owned configuration, presets, and discovery cache data are copied.

The old codex-ollama-proxy executable remains an alias for scripts and shell history. Existing Codex tasks that name the legacy ollama-launch-codex-app provider continue to work through a compatibility provider entry. Existing attachment files remain at their original paths so historical task JSONL references are not broken.

install uses the native per-user background service for the current platform:

  • macOS: a launchd agent in ~/Library/LaunchAgents
  • Linux: a systemd user service in ~/.config/systemd/user
  • Windows: a Task Scheduler task that runs at sign-in

The restart, uninstall, and logs commands use the same cross-platform setup. On Linux, the user systemd session must be available. To run without installing a background service, use codex-universal-proxy serve in a terminal.

If CODEX_HOME is set during installation, the generated background service preserves that directory for future starts. Linux installations also honor XDG_CONFIG_HOME when locating the systemd user-unit directory.

The local proxy listens on:

http://127.0.0.1:11436

Recommended Workflow: Provider Presets

A preset saves your:

  • Provider endpoint
  • Text and image models
  • API key
  • Responses or Chat Completions adaptor
  • Routing and compatibility options

Create each provider once, then start it by name:

codex-universal-proxy run PRESET_NAME

Ollama Preset

Ollama exposes a local Responses-compatible API at http://127.0.0.1:11434/v1.

codex-universal-proxy preset add ollama \
  --url "http://127.0.0.1:11434/v1" \
  --text-model "MODEL"

codex-universal-proxy run ollama

Example:

codex-universal-proxy preset add glm \
  --url "http://127.0.0.1:11434/v1" \
  --text-model "z-ai/glm-5.2"

codex-universal-proxy run glm

GLM with Kimi auto-routing:

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

Explore related