Open source · MIT
AI Switch brings the accounts, protocols, and capacity behind Codex, Claude Code, Gemini CLI, Grok and more into one place: a single local proxy entry, automatic pool scheduling, and on-demand upstream protocol bridging. The desktop app and the self-hosted web service share the same data.
Codex, Claude Code, Gemini CLI and Grok get native config writing and official account import. OpenCode, OpenClaw and Hermes connect through generic API routing, which still covers routing, terminal launch and session workflows.
Native config writing uses safe direct writes: a snapshot is taken before mutation, the write is atomic, concurrent changes are detected, and guarded rollback is supported.
See the full capability matrix →Each CLI keeps speaking its own protocol. AI Switch translates the request inside the local proxy to whatever the upstream account actually supports, so switching providers never means editing CLI config.
Local entry
/responsesOpenAI Responses/v1/messagesAnthropic MessagesGemini nativeGemini accounts only127.0.0.1:19527Upstream protocol
openaiChat Completionsopenai-responsesResponses APIanthropicMessages APIgeminigenerateContentSeven bridge routes
Responses → Chat CompletionsResponses → ResponsesResponses → AnthropicResponses → GeminiClaude → Chat CompletionsClaude → ResponsesClaude → GeminiGive every account a priority from 1 to 5 and a concurrency cap, pooled per platform. High priority goes first; when it saturates, traffic falls through to the next tier.
Pick any of four upstream protocols. When the local entry protocol differs from the upstream, the proxy converts it. Listens on 127.0.0.1:19527 by default.
Transient failure counts and failure kinds are recorded, bad accounts are pulled out for a cooldown window, and retried back into the pool when it expires.
Input, output and cache tokens are recorded per request, priced in both USD and CNY, and breakable down by account and platform.
Launch CLIs straight from the built-in terminal, resume sessions, and swap between three Vibe skins when the mood calls for it.
Manage MCP server config across 11 clients from one place, plus two bundled skill packages totalling 27 skills.
Desktop and browser share the same React UI and the same database, so proxy behaviour is identical either way.
A native Tauri 2 shell talking to the Rust core over IPC.
Start the web service with token auth and open it from a phone or tablet.
Log in to Tailscale manually and reach it across your private network.
Enable Funnel when you need public reach — the token is still required.
Default bind is 127.0.0.1:3090; binding to 0.0.0.0 must be explicit. Every /api/* and /ws/events request needs the access token, Tailscale included.
See deployment options →One frontend, two transports, a shared core. The Rust core serves both desktop IPC and HTTP, so the two ends cannot drift apart.
Stack
Install the desktop build and go, or run the service yourself for a team.