Casbin Gateway

Between your AI coding agents and every model API they call, Casbin Gateway adds one endpoint that grades whether each provider is genuine, fails over when one stops answering, and records what the agents sent and spent. Authenticity probes grade each provider from A to F when it is added and whenever its report goes stale, exposing resellers that swap in a cheaper model or fake cache hits. A standalone probe tests any compatible endpoint without installing Gateway. Providers come from 44 vendor presets or any OpenAI-compatible or Anthropic-compatible URL, and Gateway translates four wire formats so Codex can run on DeepSeek or Claude Code on Kimi. Exhausted keys and dead relays pass a request to the next provider, routing rules decide what each model name becomes, and Claude, ChatGPT, or Copilot subscriptions can be pooled. More than thirty permission switches per agent compile to a Casbin policy enforced on every relayed request, and policy packs block destructive commands, secret access, unknown hosts, and publishing. LLM Records keep each call's full prompt, messages, tool schemas, tokens, and cost, while Usage reads the agents' own transcripts to count spend that bypassed Gateway. Before opening Gateway beyond localhost, change the default admin password and send the relay token with every /v1 request. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. Apache-2.0 licensed.

Casbin Gateway
Casbin Gateway
Casbin Gateway
Casbin Gateway
Casbin Gateway
Casbin Gateway
Casbin Gateway
Casbin Gateway
Casbin Gateway
Casbin Gateway
Casbin Gateway

Benefits

  • Catch Resellers Faking Models
  • Authenticity sends test cases to each upstream and grades it from A to F, exposing swapped models, fake cache hits, and parameters a reseller quietly drops before you rely on its key.
  • One Endpoint for Every Vendor
  • Point agents at one base URL and switch providers from the console; Gateway translates between OpenAI, Anthropic, Responses, and Gemini formats, so Codex can run on DeepSeek or Claude Code on Kimi.
  • Permissions Enforced on Every Request
  • More than thirty switches per agent compile to a Casbin policy that strips tools and blocks models before a request leaves, so an agent gets less access without editing its own configuration.
  • Full Records of What Agents Spend
  • LLM Records keeps each relayed prompt, message, and tool schema with tokens and cost, and Usage reads the agents' own transcripts, so spend off Gateway is counted too.

Features

  • Authenticity Grading
  • Probes every provider for model identity, injected prompts, honoured parameters, tool schemas, streaming events, and cache accounting, then scores it out of 100 with an A to F grade.
  • Failover and Model Routing
  • Exhausted keys, rate limits, and dead relays move a request to the next provider; routing rules of up to eight steps decide what each model name steps down to.
  • Subscription Pooling
  • Hold several Claude, ChatGPT, or GitHub Copilot subscriptions as providers, pick a pool strategy such as soonest reset first, and see what each plan window has left.
  • Policy Packs and Guards
  • Packs for destructive commands, secrets, unknown hosts, and publishing read every tool call's arguments through a hook, and you can add host, path, and command guards.
  • Browser and Telegram Chat
  • Drive Claude Code, Codex CLI, Qwen Code, or Gemini CLI from a browser chat, or from Telegram and WeChat bots limited to an allowed-user list.
  • Agent Fleet Management
  • Finds installed agents, shows versions against their package managers, installs, upgrades, or rolls back builds, and copies skills, MCP servers, and prompt files across agents.

Apps Similar to Casbin Gateway