OmniRoute
ProductivityLocal AI gateway: one endpoint for many providers, with quota-aware fallback for Claude Code and other CLIs.
Install
$ npm install -g omniroute
Update
$ npm install -g omniroute@latest
Under npm 11 or later, allow the install scripts npm names in its warning; the README lists the allow-scripts form.
When to use it
- Your Claude quota runs out mid-task and you want requests to fall back to another provider or model
- You want one endpoint and one set of credentials for several providers and tools
- You want to try a different model inside Claude Code without editing config files by hand
- You run a shared or remote gateway for a team and need access tokens and a dashboard
Commands & flags
- omniroute
- Start the gateway; the dashboard is at http://localhost:20128 and the API at /v1.
- omniroute run claude --model openai/gpt-5.4
- Launch Claude Code through OmniRoute with a chosen model, writing no config files.
- omniroute launch
- Point Claude Code at a local or remote OmniRoute.
- omniroute setup-claude
- Generate per-model Claude Code profiles under ~/.claude/profiles.
- omniroute configure claude
- Pick provider and model interactively and write the tool's own config.
- claude mcp add --transport http omniroute http://localhost:20128/api/mcp/stream
- Give Claude Code OmniRoute's toolset over MCP (the README's add-server form is not a Claude Code command).
How to use it
Install and start the gateway, add your providers in the dashboard, then launch Claude Code through it. Claude Code is pointed at a gateway with environment variables such as ANTHROPIC_BASE_URL, and omniroute launch and omniroute run claude set them for you.
npm install -g omniroute
omniroute
omniroute run claude --model openai/gpt-5.4
Use --dry-run to preview the exact environment and arguments, and --api-key-env NAME to keep secrets out of shell history. Environment variables are read once at startup, so restart Claude Code after changing them.
Why it earns its place
A single quota is a single point of failure. A gateway that speaks the API Claude Code expects lets you route around a hit limit, mix cheaper models in for easy work, and watch usage in one place. It is also one more service to run and trust with your keys, so skip it if you only use one provider and rarely hit limits. Check each model's terms before you route a subscription through a third party.
Try it
> omniroute run claude --model openai/gpt-5.4