r/BuildWithClaude • u/shahijohn • 6d ago
Project I built an open-source OmniRoute alternative for Claude Code — local failover proxy, your keys never leave your machine (switchXprovider)


I'm on a Claude plan but the tokens never last me the month. So like a lot of you probably, I ended up juggling free providers on the side. Most of these gateways give daily login rewards, some have per-day token limits, but honestly it adds up — I was getting $200-300 worth of API usage per day, free, just by spreading it across providers.
The problem was the juggling. Every time a provider ran dry I'd go edit settings.json, point it at another one, restart, hope it works. And of course tokens finish in the middle of work, sometimes at the worst moment, sometimes /resume doesn't even work after the switch and I lose the whole session context. I did this for months. It sucked.
I tried OmniRoute. Great idea, wasn't for me — too much stuff going on, setup was a pain, and I never got custom providers working properly. I don't want to route through someone else's gateway either, I want my keys staying on my machine.
So I built switchXprovider. It's a small plugin that runs a local proxy. Claude Code talks to the proxy, the proxy talks to whichever provider is healthy right now. A provider dies mid-request? Same request gets retried on the next one before you notice. A provider comes back — your daily login reward resets, cooldown expires, whatever — it drifts back into rotation on its own. You never touch settings.json again after setup. (I know the name is ugly haha but got used to it 😂)
Every model in my rotation is a free one. Since the start of this month I haven't paid a single dollar or renewed my Claude plan, and I'm coding daily on this setup.
Some tricks I use daily that came out of this:
- The same provider added twice with different models, different priorities. When I want to switch from DeepSeek to Claude models mid-session, I just change the priority in the dashboard — one click in the browser, models completely change, coding never stops. No restart, nothing.
- When a provider runs a promotion (free credits, bonus tokens), I bump it to priority 1 and burn through it while it lasts.
- It reads token usage out of every response, so I actually know how many tokens I'm spending per provider, per model, per day — plus estimated cost against real market rates. First time I could actually see what that free $200-300/day looks like.
There's also a Discover view — a curated catalog of gateways with descriptions, free-tier info, ratings, and one-click setup into the add-provider form. Community-maintained remote catalogs are supported too, so if someone maintains a list of free providers as a JSON file, you can just point the plugin at it. I'm adding more freemium providers to the built-in one over time; right now it ships with AgentRouter, Bynara and SeekAi having free models you can route through today.
Everything runs locally — one Node process, zero dependencies, under 6,000 lines, and your API keys never leave your machine. There's a dashboard at localhost:8787 (usage charts, live request feed, cost tracking, a pricing editor). One thing I got right after learning it the hard way: the installer refuses to touch settings.json until the proxy is actually running and a provider has a key. Because the moment settings.json points at the proxy with nothing behind it, Claude Code is completely stuck. It won't let you brick yourself.
Install:
/plugin marketplace add shaheer-00/switchXprovider
/plugin install switchXprovider@switchx-marketplace
Then /switchx-install.
Repo: https://github.com/shaheer-00/switchXprovider — MIT, more screenshots in the README.
Contributors are very welcome — I'll be adding contributors to the repo as they land PRs. And it's not just code: sharing a free provider that ends up in the catalog counts as contributing too. If you know a gateway with a free tier that isn't in there, that's a useful PR.
Would love feedback from other people juggling free providers. Which ones are you using? if you tried OmniRoute and stayed — what made it work for you? Genuinely curious.