Claude Code model router

Casbin Gateway

See what every AI coding agent on your machine is doing, and whether the API behind it is the one you paid for. Claude Code, Codex, Cursor, Gemini CLI and more: one endpoint for 44 model vendors, A–F API authenticity grading, per-agent permissions, usage and prompt records.

Install

From source
git clone https://github.com/apache/casbin-gateway.git

From the README

📦⚡️ Casbin Gateway
See what every AI coding agent on your machine is doing, and whether the API behind it is the one you paid for.

  English | 中文

Every coding agent on the machine

Any model vendor behind one endpoint

- Is that API key what it was sold as? A reseller can serve a cheaper model, fake a cache hit, or quietly drop a parameter it claims to support. Authenticity probes every provider on its own and grades it A–F, and grades a single endpoint without installing anything.
- What every agent did, spent and sent. Every prompt and tool call, the spend read from the agents' own transcripts, and, on Windows, where each agent's own processes upload data, including what never passes through any proxy.
- One place for all of them. Point Claude Code, Codex, Cursor, Gemini CLI and the rest at any of 44 model vendors, fall over to another vendor when one runs out or goes down, say what each may do, and install, upgrade or roll back the agents themselves.

Run it

One command. No database, no Go, no Node, no configuration.

On Linux and macOS:

On Windows, in PowerShell:

Either one downloads the build for this machine, unpacks it into ~/.local/share/casbin-gateway (%LOCALAPPDATA%\casbin-gateway on Windows), puts a casbin-gateway command on your PATH, starts it, and arranges for it to start again when you log in. The terminal you installed from is yours again straight away.

Gateway then opens in its own window — no sign-in: it serves this machine only and signs the local admin in on sight. Closing that window leaves Gateway running behind its tray icon, which is also where you reopen the window, turn Start at Login off and on — Settings → Startup is the same switch — and quit for real. There is a Casbin Gateway entry on your desktop and in the Start menu, in…
Read the full README on GitHub

Details

Language
Go
License
Apache-2.0
Last updated
31 October 2026
Topics
access-controlagent-monitoringai-agentai-gatewayanthropicapi-proxycasbinclaude-codecodexcodex-clicoding-agentcursor

FAQ

What is Casbin Gateway?

See what every AI coding agent on your machine is doing, and whether the API behind it is the one you paid for. Claude Code, Codex, Cursor, Gemini CLI and more: one endpoint for 44 model vendors, A–F API authenticity grading, per-agent permissions, usage and prompt records. It is a model router for Claude Code, from apache/casbin-gateway on GitHub.

How do I install Casbin Gateway?

Clone apache/casbin-gateway from GitHub and follow the setup steps in its README.

Is Casbin Gateway popular?

apache/casbin-gateway has 646 GitHub stars and 73 forks. It was last updated on 31 October 2026.

More model routers & proxies

Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.