Skip to content
Projects

Edward-lyz/codex-mixin has 139 GitHub stars and 33 forks. GitHot measured +3 stars in 24 hours. Last checked 2026-11-16 18:54 UTC. Last push 2026-11-15.

How these counts are measured

Measured star growth

in 24h
+3
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

Cross-platform local gateway for mixing custom model providers with the official subscritions

Web & Apps

README_en.md

Original

Codex Mixin Logo

Codex Mixin

Use any model in official Codex. Official GPT models and ChatGPT sign-in stay as they are.
A local model gateway written in Rust: configure providers once, and Codex plus 50 coding agents share one model list.

简体中文 | English

Latest release Platforms Docs

Codex Mixin model routing: several models answer in parallel, a judge model reviews, a final model replies

Core Capabilities · Resource Usage · Quick Start · Interface · Providers · Agents · Docs · FAQ


Core Capabilities

Codex Mixin runs on your machine, between your agents and your model providers. It converts requests and streaming responses across four protocols: OpenAI Responses, Chat Completions, Anthropic Messages, and Gemini, including reasoning content and tool calls. The CLI, the native macOS and Windows apps, and the Web panel share one core.

Official Codex stays intact

Connect Codex in Official Account mode and your custom models join the official model picker, next to GPT. ChatGPT sign-in, session history, mobile remote tasks, and voice keep working. Connecting and disconnecting never touch the Codex session database or account state; after you disconnect, the Codex configuration returns to the official OpenAI defaults.

Model routing: one model name, a group of models behind it

Each route appears as an auto/<name> model that every connected client can pick from its model list. All three interfaces let you edit routes directly on a flow chart; the CLI uses codex-mixin route.

Route type Behavior
Failover When the source model errors before producing output (including exhausted quota), or produces nothing for 30 seconds, the gateway switches to 1–4 fallback models in order
Fusion 1–8 models answer in parallel, a judge model reviews, and a final model revises and replies
Schedule Requests go to different models by local time, across 1–24 time slots

See Model routing for triggers, limits, and coverage.

Context engine: compress history, keep the originals restorable

The gateway keeps an archive of original messages and a compressed view for each session. The model compresses older history itself through internal tools injected by the gateway, and searches or restores the originals when it needs them; the most recent 10,000 tokens always stay verbatim. Compression has three tiers, with rules ported from Billion Context.

The engine is off by default. Enable it with codex-mixin context config set --enabled true or the console switch. See Context engine for supported request paths and every setting.

macOS context engine settings and session statistics
Console · Sessions, compressions, tokens saved
Built-in compaction compared with archived, tiered context management
Mechanism · Built-in compaction vs. archived tiers

Usage, reply by reply

The latest 100,000 replies are kept locally with tokens, cache hits, reasoning cost, first-token latency, and output speed for each one. Failed replies are recorded too. The menu bar and tray show provider quota directly.


Resource Usage

With the full UI running, Codex Mixin uses 76.8 MiB at idle and 113.5 MiB with 40 concurrent requests. In Lightweight mode only the background gateway stays, and the gateway process idles at about 5 MiB.

The table below compares Mixin 0.7.7, CC Switch 4.0.26, and Magpie 0.1.3051 on the same Apple M2, all connected to a controlled local upstream at the same time. Every request carries 1,000,000 text tokens and two 1024 × 768 PNGs.

Measurement Codex Mixin CC Switch Magpie
Idle memory 76.8 MiB 157.6 MiB 243.2 MiB
10 active requests 91.1 MiB 165.1 MiB 374.9 MiB
20 active requests 98.0 MiB 171.9 MiB 664.3 MiB
40 active requests 113.5 MiB 185.8 MiB 1,284.9 MiB
CPU · 40 active requests 1.047% 1.777% 6.743%

Desktop physical memory and gateway-host CPU at 0, 10, 20, and 40 active requests

Method, raw samples, and validation data are in the benchmark report.


Quick Start

Install

Download the package for your platform from Releases. You do not need Rust or a source build.

Platform Install Entry point
macOS Download the Apple Silicon or Intel .dmg and drag the app to Applications Menu bar icon → Open Console
Windows Run windows-x86_64-setup.exe, or extract the portable Zip System tray icon → Open Console
Linux Extract the x86_64 or ARM64 unknown-linux-musl.tar.gz and run ./codex-mixin panel; a .deb is also available Open the address printed in the terminal
# Homebrew (macOS / Linux): CLI; use --cask for the desktop app
brew tap edward-lyz/codex-mixin https://github.com/Edward-lyz/codex-mixin
brew install codex-mixin            # or: brew install --cask codex-mixin

# Docker: 8317 is the gateway, 8318 the control panel; get the panel URL and token from docker logs codex-mixin
docker run -d --name codex-mixin -p 127.0.0.1:8317:8317 -p 127.0.0.1:8318:8318 -v codex-mixin:/data ghcr.io/edward-lyz/codex-mixin

See Installation for system requirements, file names, and remote access.

Set up in the console

  1. In Models & Services, add a provider with an API key or OAuth sign-in.
  2. Refresh the model list, check the models you want, and save.
  3. On the Agents page, connect an installed client. For Codex, choose Official Account mode.
  4. Restart the client or open a new session, then pick a custom model in the model picker.

To restore a client's original configuration, disconnect it on the same page.

Or use only the command line

curl -fsSL https://raw.githubusercontent.com/Edward-lyz/codex-mixin/main/scripts/install.sh | sh
codex-mixin provider add --preset deepseek --key sk-...   # discovers models automatically
codex-mixin connect codex
codex-mixin service start
curl http://127.0.0.1:8317/v1/models                      # a model list means it works
Ports, remote access, and access keys

The gateway listens only on 127.0.0.1:8317 by default. The Web panel listens on all interfaces on port 8318 and requires a token generated for each start. If a port is taken, either one falls back to a free port in 8000–9000.

To let other devices reach the gateway, start it with codex-mixin service start --bind 0.0.0.0:PORT; the listen address is saved. When the gateway listens beyond localhost, its first start generates an sk- access key and prints it to the terminal. Requests from the local machine and private networks (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, fc00::/7, fe80::/10) need no key; any other source must send the key in the Authorization: Bearer <key> or x-api-key header, or the gateway returns 401. Manage multiple keys with codex-mixin config keys list / create / revoke or the Access Keys page of the control panel.

See Data and Security for the access boundaries.


Interface

macOS has a native menu bar app and console, Windows has a WPF console and tray, and Linux uses the CLI and Web panel. All three offer the same features.

macOS Models and Services page: provider list and model selection
Models & Services · Providers, models, and capabilities
macOS Agents page: installed versions and connection actions
Agents · Installed versions, connection state, and restore
macOS Usage page: daily statistics and per-reply data
Usage · Tokens, cache, and speed for every reply
Native Windows Models and Services console
Windows console · Models & Services

More screens are in the Product Tour.


Providers

Choose one of these presets when adding a provider, or Custom for any other compatible endpoint. After adding one, you can test the connection, refresh the model list, and probe Reasoning, Function Calling, Tool Search, and Web Search support. Probing sends real requests and may consume quota.

Preset Provider Upstream protocol Authentication
openai OpenAI OpenAI Responses ChatGPT OAuth
claude-code Claude Code Anthropic Messages Reuses the local Claude Code login and calls the official claude through the built-in PTY/ConPTY bridge
baidu-oneapi Baidu OneAPI Anthropic Messages; GPT models use OpenAI Responses API key
openrouter OpenRouter OpenAI Chat Completions API key
deepseek DeepSeek OpenAI Responses API key
agy Google Antigravity Gemini Google OAuth
agy-business Antigravity Business Gemini Google OAuth or GCP ADC credentials, with project and region required
kiro Kiro Anthropic Messages Reuses the local Kiro / kiro-cli login
opencode-go OpenCode Go OpenAI Responses API key, with a session affinity header
aws-bedrock Amazon Bedrock (Mantle) Anthropic Messages Bedrock API key or AWS access key
custom Any compatible endpoint OpenAI Responses (default) Custom headers and key

The Claude Code subscription reuses your local login and runs the official interactive claude through a built-in PTY/ConPTY bridge, with streaming output, MCP tool round trips, and in-process session reuse. This path requires Claude Code to be installed, and stream capture depends on its Bun runtime; an incompatible runtime produces an explicit error.


Agent Integrations

50 agents are supported. 47 of them use custom models through the gateway, and disconnecting restores the managed fields while keeping unrelated configuration. Cursor CLI, Copilot CLI, and Devin manage vendor-native models through vendor accounts. Prerequisites for each client are in the Agent contracts.

Show all 50 agents
Codex logo
Codex
Claude Code logo
Claude Code
Claude Desktop logo
Claude Desktop
DSH logo
DSH
OpenCode logoOpenCode logo
OpenCode
Pi logoPi logo
Pi
OpenChamber logo
OpenChamber
MiMo Code logoMiMo Code logo
MiMo Code
OmO logoOmO logo
OmO
Goose logoGoose logo
Goose
VS Code logoVS Code logo
VS Code
VS Code Insiders logoVS Code Insiders logo
VS Code Insiders
Copilot for JetBrains logoCopilot for JetBrains logo
Copilot (JetBrains)
Air logo
Air
Crush logo
Crush
Oh My Pi logoOh My Pi logo
Oh My Pi
Hermes Agent logoHermes Agent logo
Hermes Agent
Mister Morph logo
Mister Morph
Kimi Code logoKimi Code logo
Kimi Code
Qwen Code logo
Qwen Code
Droid logoDroid logo
Droid
Qoder logoQoder logo
Qoder
Qoder CN logoQoder CN logo
Qoder CN
Grok Build logoGrok Build logo
Grok Build
ZCode logo
ZCode
WorkBuddy logo
WorkBuddy
CodeBuddy logo
CodeBuddy
Pencil logo
Pencil
T3 Code logo
T3 Code
AtomCode logo
AtomCode
VSCodium logoVSCodium logo
VSCodium
Reasonix logo
Reasonix
Command Code logoCommand Code logo
Command Code
fx logofx logo
fx
Empryo logo
Empryo
Ante logo
Ante
MiniMax Code logo
MiniMax Code
Cline logoCline logo
Cline
Gemini CLI logo
Gemini CLI
agy logo
agy
Cursor CLI logoCursor CLI logo
Cursor CLI · native models
Cursor logoCursor logo
Cursor
Copilot CLI logoCopilot CLI logo
Copilot CLI · native models
Devin logoDevin logo
Devin · native models
Zed logoZed logo
Zed
Aside logo
Aside
Muse logo
Muse
Hanako logo
Hanako
Alma logo
Alma
Cindy logo
Cindy

Documentation

Guides live in the GitHub Wiki:

Design and mechanism documents live in the repository:

For version changes, see RELEASE_NOTES.md.


FAQ

Can I keep ChatGPT sign-in and official GPT models?

Yes. Connect Codex in Official Account mode. Custom models join the official model picker, while sign-in, session history, and mobile remote tasks remain available. Connecting and disconnecting do not change the Codex session database or account state. See Client integrations.

Do all 50 agents use custom gateway models?

47 support gateway configuration or native-app integration. Cursor CLI, Copilot CLI, and Devin manage vendor-native models through vendor accounts. Native applications and terminal launches have specific prerequisites; see the Agent contracts.

How do I use the panel on a remote Linux machine?

Extract the release archive and run ./codex-mixin panel. Keep the process running and open the printed address using a reachable host address. The panel listens on all interfaces on port 8318 (falling back to a free port in 8000–9000 if taken) and requires the token generated at startup. See Installation and Data and Security.

Does the context engine compress every request?

It is off by default. When enabled, it requires a session ID and a supported request path: Responses and mappable native Anthropic Messages content can enter the shared loop; hosted tools and native content that cannot be mapped faithfully pass through. See Context engine.

Are exported backups encrypted?

No. Backups contain API keys and use Base64 encoding. Treat them as credentials. See Configuration backup and restore.


License

Codex Mixin is licensed under CC BY-NC 4.0: you may use, modify and redistribute it with attribution, but not for commercial purposes. Contact the author for commercial licensing. Third-party notices are in NOTICE.