Claude Code setup guide
Change one Base URL and key to run Claude and other frontier models in Claude Code.
OmniRoute is a local proxy gateway on port 20128—not a Claude Code plugin. Install it with npm, wire up your API keys or Ollama models into Model Combos, and launch Claude Code without editing your base config.
Relying on a single model provider in Claude Code usually breaks down in two ways: hitting a 429 rate limit mid-session, or juggling separate keys across cloud APIs and local Ollama models. OmniRoute is an open-source local AI gateway built to sit between your coding agents and those upstream providers, exposing standard Anthropic and OpenAI endpoints from your own machine.
First, a quick clarification: Despite common searches for an OmniRoute plugin in Claude Code, OmniRoute is a standalone local proxy gateway on port 20128 rather than a Claude Code plugin or MCP server. Point ANTHROPIC_BASE_URL to localhost and OmniRoute handles routing, failover, and credential switching behind the scenes—useful if you already hold multiple provider keys or mix local models with cloud APIs.
Check your Node.js version first. The global omniroute npm package requires Node.js >=22.22.2 and <23, or >=24 and <27 (Node.js 23 is skipped). Verify your runtime and install the CLI globally:
node -vnpm install -g omnirouteStart the local gateway. On macOS, Windows, or desktop Linux, --tray runs the daemon in the background with a system tray icon for quick restarts and log checks:
omniroute serve --trayOn headless machines or if you prefer foreground logs, run omniroute directly. The server binds to port 20128 by default, and you can override it with the OMNIROUTE_PORT environment variable.
Open http://localhost:20128/dashboard in your browser to finish initial setup:
CHANGEME (can be overridden before launch via INITIAL_PASSWORD)http://localhost:20128/v1 for OpenAI-compatible tools and http://localhost:20128 for Anthropic-protocol tools like Claude CodeIn the dashboard, add the upstream accounts you already have under Providers. OmniRoute groups connectors into several buckets:
Once your providers are connected, create a Model Combo to define how requests flow when a primary model is busy or throttled:
Generate a local OmniRoute API key in the dashboard before wiring up Claude Code.
You can connect Claude Code in two ways: a zero-edit session wrapper that leaves your config untouched, or a persistent settings.json entry.
omniroute launch)If you want to test OmniRoute without modifying your existing Claude Code setup, use the built-in launcher:
omniroute launchThis injects the local OmniRoute environment variables into that single Claude Code session without writing to ~/.claude/settings.json. If you maintain multiple routing profiles, generate Claude profiles once and pick one at launch:
omniroute setup-claudeomniroute launch --profile <profile-name>~/.claude/settings.jsonTo route every claude invocation through OmniRoute by default, edit your Claude Code settings file (~/.claude/settings.json on macOS and Linux, or C:\Users\<YourUsername>\.claude\settings.json on Windows):
{ "env": { "ANTHROPIC_BASE_URL": "http://localhost:20128", "ANTHROPIC_AUTH_TOKEN": "YOUR_OMNIROUTE_API_KEY", "ANTHROPIC_API_KEY": "", "ANTHROPIC_MODEL": "auto" }}Two details save debugging time:
env values only at startup, so active sessions will not pick up changesenv preserves existing permissions and MCP entriesOmniRoute solves local routing across keys and runtimes you already manage, but it does not supply model quota itself. You still maintain each vendor account, billing method, and spend limit. Here is how self-hosted local routing compares with calling a single vendor API directly or using a managed multi-model gateway like CodingPass:
| Dimension | OmniRoute (local router) | Direct provider API | CodingPass (managed gateway) |
|---|---|---|---|
| Setup and maintenance | Local Node.js runtime, background daemon, self-updated | Zero deployment, just set a key | Zero deployment, change one Base URL |
| Accounts and billing | Separate accounts, keys, and invoices per vendor | One invoice per vendor, new signup to switch | One account and one monthly bill across 25 models |
| Multi-model and failover | Built-in Model Combos with custom fallback and round-robin | No cross-vendor failover | Switch models by ID on one endpoint across Claude and frontier models |
| Local models (Ollama, etc.) | Native support alongside cloud APIs | Not supported | Cloud-hosted models; pair with local tools when needed |
| Cost predictability | Follows upstream pay-as-you-go billing | Pay-as-you-go; long contexts can spike bills | Fixed monthly allowance from $10 (Go) or $30 (Plus), no surprise charges |
If you would rather not maintain a local daemon or juggle four billing dashboards, pointing Claude Code directly at CodingPass keeps the setup to two lines. Go starts at $10 a month for roughly 2,050 Claude Sonnet requests, and the same allowance covers all 25 models on the Models page. Check the Claude Code setup guide and Pricing for the exact numbers. You can also combine both: register CodingPass as one upstream provider inside OmniRoute so local Ollama handles offline drafts while CodingPass covers cloud models on a fixed monthly budget.
| Workload / scenario | Recommended choice | Reason or tradeoff |
|---|---|---|
| Already holding 3+ provider keys plus local Ollama models | OmniRoute | Model Combos unify local and cloud models under one localhost endpoint; you own daemon upkeep and vendor bills |
| Daily Claude Code work with a fixed monthly budget | CodingPass | One Base URL covers Claude and frontier models with no overage surprises; see the Claude Code setup guide |
| Need local Ollama fallback plus predictable cloud spend | OmniRoute + CodingPass | OmniRoute handles local routing rules while CodingPass supplies cloud models on one monthly bill |
| Single-vendor production pipeline with an existing enterprise commit | Direct provider API | Shortest network hop and zero proxy layer, at the cost of manual switching between vendors |
If you also run other terminal coding agents alongside Claude Code, the same endpoint approach works in our OpenCode setup guide and Codex setup guide.
No. OmniRoute is a standalone open-source local proxy gateway running on port 20128 that speaks both Anthropic and OpenAI protocols. You connect Claude Code by pointing ANTHROPIC_BASE_URL to http://localhost:20128 rather than installing a plugin inside Claude Code.
omniroute launch overwrite ~/.claude/settings.json?No. omniroute launch injects the proxy environment variables into the current shell session without modifying files on disk. If you want a permanent setup, add ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN manually inside the env block of ~/.claude/settings.json.
Yes. CodingPass exposes standard Anthropic and OpenAI-compatible endpoints, so you can add it as an upstream provider in OmniRoute and include it in a Model Combo. If you do not need local Ollama routing, pointing Claude Code directly to CodingPass removes the extra local hop.
CodingPass puts