One local gateway for your AI model requests.
AgentGate is a local AI gateway for AI apps and clients, including Codex, Claude Code, Gemini CLI, OpenCode, AtomCode, and apps compatible with OpenAI, Anthropic, or Gemini protocols. It routes each request to the model you choose, fails over automatically when a provider breaks, traces everything locally, bridges protocol differences across OpenAI-compatible providers, and keeps long-running AI tasks from being interrupted by automatic sleep on macOS and Windows.
中文 · Download · 5-Minute Quick Start · Full Reference · 💬 Discussions
GitHub: dengmengmian/agentgate-ai
New in v1.6.0 — Session affinity, budget gate, local models: Stick multi-turn chats to one upstream, cap daily spend (notify / block / force cheapest), Diff raw vs converted request bodies with redacted repro export, and one-click scan for Ollama / LM Studio. See the v1.6.0 release notes · Cursor / Continue / Cline · Local models.
| Your machine | Download |
|---|---|
| macOS Apple Silicon | AgentGate_1.6.1_aarch64.dmg |
| macOS Intel | AgentGate_1.6.1_x64.dmg |
| Windows 10 / 11 | AgentGate_1.6.1_x64-setup.exe |
| Debian / Ubuntu | AgentGate_1.6.1_amd64.deb |
| Other Linux distros | AgentGate_1.6.1_amd64.AppImage |
Windows install note: Edge/Chrome may say the file is “usually not downloaded,” and SmartScreen may show Windows protected your PC. That is expected: the installer is not Authenticode-signed. There is no free, widely trusted Windows code-signing certificate (Let’s Encrypt only covers HTTPS, not .exe), so open-source builds often ship unsigned — this is not a virus report. Download only from GitHub Releases. In the browser choose Keep / Keep anyway, then when SmartScreen appears click More info → Run anyway.
On macOS you can also install with Homebrew:
brew install --cask dengmengmian/tap/agentgateHeadless CLI (agentgate-serve) tarballs and older versions are on the Releases page.
| Official experience intact | Model routing is yours | Every request visible |
|---|---|---|
| Keeps Codex / Claude Code / Gemini CLI / OpenCode / AtomCode usable the way you already use them, with one-click restore to official configs. | Official client requests enter AgentGate first, then route through protocol conversion or native pass-through to the upstream provider you choose. | Route decisions, converted payloads, upstream errors, tokens, cost, latency, and failover attempts are traced locally. |
AgentGate is not a hosted API reseller or a generic proxy. It is a local entry point for AI model requests — every request enters AgentGate first, then routes, converts, fails over, or passes through under your control.
CodeLeveler writes the code. ReviewGate reviews it. AgentGate connects both to your model APIs. Each tool works independently, or they can be used together:
| Tool | Focus |
|---|---|
| AgentGate | Adapt model APIs behind one local gateway |
| CodeLeveler | Inspect, edit, run, and verify code in the terminal |
| ReviewGate | Review code changes and surface high-confidence issues |
- Download and install AgentGate.
- Open Quick Setup or Providers, then paste your provider API key.
- Click Start Gateway on Overview or Gateway. The default endpoint is
127.0.0.1:9090. - On Clients, click Apply Config for Codex, Claude Code, OpenCode, Gemini CLI, or AtomCode.
- Send a test message in the client. Use Switch to Official or history rollback whenever you want to restore the original config.
Provider presets fill common base URLs, protocols, model defaults, and capability matrices. Most users do not need to touch model mapping or advanced endpoint fields at first.
| Goal | What AgentGate does |
|---|---|
| Use Codex with DeepSeek or MiMo | Lets Codex keep sending official Responses API traffic, then converts or passes it through to the selected upstream. |
| Keep Codex Desktop plugins working | Preserves the official OpenAI-authenticated provider path while routing model requests through AgentGate. |
| Use Claude Code with DeepSeek / MiMo / Copilot | Supports Anthropic-compatible pass-through, model-name mapping, and optional GitHub Copilot provider setup. |
| Avoid provider outages or quota stalls | Tries failover providers on configured status codes, keywords, timeouts, and cooldown state. |
| Keep long AI tasks running unattended | Prevents automatic sleep on macOS and Windows by default, with optional request-aware control and quick system-tray toggles. |
| Understand every request | Stores raw and converted payloads, route decisions, upstream errors, token counts, latency, and estimated cost. |
Supported providers
| Provider | Type | Native Protocols | Provider-Specific Handling |
|---|---|---|---|
| Xiaomi MiMo | mimo |
Chat + Anthropic | Multi-turn reasoning_content round-trip, region-aware tp-* host auto-routing, temperature strip in thinking mode, tool_choice non-auto strip, omni web_search strip, web_search builtin gated by matrix, Web Search Plugin auto-degrade / retry |
| DeepSeek | deepseek |
Chat + Anthropic | Image stripping with explicit notice, DeepSeek V4 thinking history reasoning backfill, schema cleaning, message reordering |
| Anthropic (Claude) | anthropic |
Anthropic | tool_use/tool_result, input_schema, thinking budget, native cache_control |
| GitHub Copilot | copilot |
Chat + Anthropic | GitHub token → Copilot bearer exchange, x-initiator billing classification, Claude model dash→dot normalization |
| OpenAI | openai |
Chat + Responses | None (Responses passthrough or Chat conversion) |
| Google Gemini | google_gemini |
Chat | None |
| Kimi / Moonshot | kimi |
Chat + Anthropic | web_search → builtin_function/$web_search; K3 uses reasoning_effort:max (no K2 thinking param); coding models keep thinking on/off control |
| MiniMax | minimax |
Chat | Strip reasoning_effort / response_format, <think> extraction |
| GLM (Zhipu) | glm |
Chat | Generic |
| DashScope (Qwen) | dashscope |
Chat | Generic |
| SiliconFlow | siliconflow |
Chat | Generic |
| Volcengine (Doubao) | volcengine |
Chat | Generic |
| Baichuan | baichuan |
Chat | Generic |
| StepFun | stepfun |
Chat | Generic |
| SenseNova | sensenova |
Chat | Drops null strict / response_format / non-function tools, merges system messages |
| Yi (01.AI) | yi |
Chat | Generic |
| ModelScope | modelscope |
Chat | Generic |
| xAI (Grok) | xai |
Chat | Generic |
| Mistral | mistral |
Chat | Generic |
| Groq | groq |
Chat | Generic |
| Together | together |
Chat | Generic |
| Fireworks | fireworks |
Chat | Generic |
| Cerebras | cerebras |
Chat | Generic |
| Perplexity | perplexity |
Chat | Generic |
| Cohere | cohere |
Chat | Generic |
| OpenRouter | openrouter |
Chat | None |
| Custom | custom_openai_compatible |
Chat | None (set Base URL yourself) |
- Codex Desktop plugins with third-party APIs
- Codex + DeepSeek
- Codex + Xiaomi MiMo
- Claude Code + DeepSeek
- Claude Code + GitHub Copilot
- Gemini CLI
- OpenCode
- Full reference
| Dashboard | Providers |
|---|---|
![]() |
![]() |
| Routes | Logs |
|---|---|
![]() |
![]() |
- GitHub Copilot provider support is optional. Using Copilot subscriptions outside official clients may carry account risk; read the dedicated guide before enabling it.
- The gateway endpoint is
127.0.0.1:9090;localhost:1420is only the development UI port. - AgentGate is local-first and single-user. If you operate a shared API server or billing platform, tools like one-api, new-api, or LiteLLM may fit better.
pnpm install
pnpm tauri devUseful checks:
pnpm test
pnpm build
cd src-tauri && cargo test- Questions and setup help: Discussions
- Bugs and provider requests: Issues
- Contributing: CONTRIBUTING.md
MIT




