</>MCP Agents Market
Agent

codex-router

by duolahypercho3kJavaScriptUpdated 2026-09-03

External-model router for Codex with guided Kimi OAuth/API, DeepSeek, safe migration, and rollback.

CodexClaude CodeCursorDeepSeek HarnessGemini CLIOpenClaw

Codex Router is an external-model routing proxy that allows AI coding assistants like Codex, Claude Code, Cursor, DeepSeek Harness, and Gemini CLI to use alternative LLM providers beyond their built-in defaults. It translates the OpenAI Responses API and Anthropic Messages protocols to support providers including Kimi (OAuth and API), DeepSeek, Anthropic, xAI Grok, GitHub Copilot, local Ollama models, and dozens more through a unified local gateway. The router preserves native features like tool calling, streaming, image input, and reasoning effort controls while adding capabilities such as automatic model failover, vision bridging for text-only models, and credential isolation across providers.

Key Features

Routes 100+ external models to Codex, Claude Code, Cursor, DeepSeek Harness, Gemini CLI, and OpenClaw through authenticated local gateway
Supports Kimi OAuth/API, DeepSeek, Anthropic, GitHub Copilot, xAI Grok, OpenRouter, local Ollama/LM Studio models, and 20+ provider endpoints
Automatic model failover when quota exhausted; switches to next eligible provider without losing the conversation
Vision bridge for text-only models: pastes images into non-vision models by routing screenshots to a vision-capable engine first
Native macOS menu-bar app, Windows/Linux Electron tray with Control Center for provider setup and usage monitoring
Tool-result aging and context compaction for routed models to reduce token costs while preserving tool accuracy
Multiple ChatGPT account switching with isolated profiles and quota tracking per subscription
Local credential storage with hidden terminal prompts; API keys never appear in chat or process arguments

Use Cases

  • 01Use DeepSeek V4 or Kimi K3 models in Codex without switching to a different coding assistant
  • 02Route Claude Code to GitHub Copilot models or local Ollama instances for on-premise inference
  • 03Automatically fail over to a free model when your primary provider's quota runs out mid-conversation
  • 04Paste screenshots into text-only models like DeepSeek V4 Pro by bridging to a vision model (GPT, Qwen, or local Qwen2.5-VL)
  • 05Run Cursor App or Cursor Agent with external providers instead of Cursor's built-in backend
  • 06Manage multiple ChatGPT subscriptions and switch between accounts while preserving separate usage tracking

Related Agents

View more

codex-router — FAQ

What is Codex Router?+

Codex Router is a local proxy that routes AI coding assistant requests (from Codex, Claude Code, Cursor, etc.) to external LLM providers like DeepSeek, Kimi, Anthropic, GitHub Copilot, and local models. It preserves tool calling, streaming, and other native features while adding failover and vision bridging.

How do I install Codex Router for Codex on macOS or Linux?+

Run: curl -fsSL https://raw.githubusercontent.com/duolahypercho/codex-router/main/install.sh | sh -s -- --target codex --guided --with-tray. This installs the router, sets up provider authentication, and adds the Control Center tray app. Fully quit and reopen Codex afterward.

Which AI clients does Codex Router work with?+

It works with Codex App/CLI, Claude Code, Cursor App and Cursor Agent, DeepSeek Harness, Gemini CLI, OpenClaw, opencode, pi, omp, Command Code, and Hermes Agent. Each client requires its own integration command (e.g., ./bin/model-router dsh enable for DeepSeek Harness).

Do I need API keys or subscriptions for external providers?+

Yes, most providers require an API key (DeepSeek, Anthropic, GitHub Copilot, OpenRouter, etc.) or OAuth login (Kimi Code CLI, Grok CLI). A few free gateways (OpenCode Free, Kilo Free) exist but must be explicitly enabled. The router also supports local Ollama/LM Studio models that run on your machine.

Is Codex Router free?+

The router software is free and MIT-licensed. External model usage costs depend on each provider's pricing—API keys bill separately, coding-plan subscriptions have monthly quotas, and local models are free but require your own hardware.

How does automatic failover work?+

When a provider returns a quota/balance error (402, 429 with long retry-after, or exhausted plan), the router rebuilds the turn for the next eligible enabled model and sends it again. You get one clean answer instead of a billing error. It only uses models you've already credentialed and enabled.

How do I install codex-router?+

Open the source repository on GitHub and follow its README. codex-router is a agent — MCP Agents Market links you directly to the official repo.

Is codex-router free?+

codex-router is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches