π Multi-provider AI router for Grok Build.
Route Grok Build through free & local AI providers. Auto-fallback, zero config.
GrokRoute is a smart local proxy that sits between Grok Build and AI providers. It routes your requests to free cloud providers (Agnes, Groq, Zhipu, Laguna) or your local Ollama models β giving you more choice, better speed, and zero cost.
β‘ One command. Multiple providers. All the AI power.
npm install -g grokroute; grokroute install; grokroute| Default | GrokRoute | |
|---|---|---|
| Cost | πΈ Subscription | π FREE |
| Providers | 1 built-in | 5+ with auto-fallback |
| Local models | β No | β Ollama |
| Offline mode | β No | β With Ollama |
| Privacy | Cloud-only | Your data β your choice |
| Admin UI | β CLI only | β
Web UI at :8083/admin |
# 1. Install globally
npm install -g grokroute
# 2. Auto-configure Grok Build to use the proxy
grokroute install
# 3. Launch!
grokroute
# ^ press ENTER to start Grok Build β it now uses FREE providers!That's it. Grok Build now runs through GrokRoute, routing to free providers automatically.
GrokRoute tries providers in priority order. If one fails, the next one takes over seamlessly:
Agnes AI βββ Groq βββ Zhipu βββ Laguna βββ Ollama
(fast, (fastest, (GLM, (coding, (local,
free tier) 280+ t/s) free) free tier) fully free)
- Streaming mode: tries providers one by one, 5s timeout per attempt
- Non-streaming mode: parallel race β fastest good response wins ποΈ
| Provider | Free Tier | Speed | Sign-up |
|---|---|---|---|
| Agnes AI | β Free credits | β‘ Fast | apihub.agnes-ai.com |
| Groq | β Free tier | β‘β‘β‘ 280+ tok/s | console.groq.com |
| Zhipu AI | β Free GLM models | β‘ Medium | z.ai/model-api |
| Laguna | β Free tier | β‘ Medium | poolside.ai |
| Ollama | β Fully free | π₯οΈ Local | ollama.com |
π All providers offer free tiers. You can start with zero cost.
| Command | What it does |
|---|---|
grokroute Β· groute Β· gfree |
Start proxy β press ENTER to launch Grok Build |
grokroute admin |
Open web admin UI (configure keys visually) |
grokroute install |
Auto-configure ~/.grok/config.toml |
grokroute status |
Check proxy health & active provider |
grokroute uninstall |
Restore original Grok Build config |
Open http://127.0.0.1:8083/admin in your browser β configure all providers, test connections, and manage settings.
π¨ Modern dark-theme UI with real-time status, provider testing, and one-click save.
ββββββββββββ HTTP/SSE ββββββββββββββββ API calls ββββββββββββββ
β Grok β βββββββββββββββββ β GrokRoute β βββββββββββββββββ β Agnes AI β
β Build β βββββββββββββββββ β Proxy β βββββββββββββββββ β Groq β
β (client) β OpenAI format β :8083 β OpenAI format β Zhipu β
ββββββββββββ β Python 3.8+ β β Laguna β
β + Node.js β β Ollama β
ββββββββββββββββ ββββββββββββββ
- Zero external dependencies β the proxy is a single Python file
- Your prompts never leave your machine (except to the provider you choose)
- OpenAI-compatible API β works with any tool, not just Grok Build
// ~/.grokroute/grokroute-config.json
{
"provider": "auto",
"groq_api_key": "gsk_...",
"groq_model": "llama-3.1-8b-instant",
"agnes_api_key": "sk-...",
"max_tokens": 4096,
"temperature": 0.3,
"enable_streaming": true
}Or just use the Admin UI (grokroute admin) β no manual JSON editing needed.
# Direct Python run β no Node.js needed
git clone https://github.com/wxstdo-boop/grokroute.git
cd grokroute
python grokroute-proxy.py
# Windows: run install.ps1 as admin, then start.batpython tests/test_proxy.py
# β /health
# β /v1/models
# β /v1/chat/completions (non-streaming)
# β /v1/chat/completions (streaming)
# β /admin UI loaded
# All tests passed.| Problem | Fix |
|---|---|
| "No provider available!" | Add at least 1 API key in admin UI or start Ollama |
| Port 8083 in use | Set GROK_FREE_PORT=8084 env var |
| Grok Build uses default API | Re-run grokroute install and restart Grok Build |
| Slow first response | Normal β proxy probes providers; cached after first request |
- Auto-fallback with sequential & parallel modes
- Web admin UI
- Ollama local model support
- Streaming SSE support
- Multi-provider race mode
- Docker image
- System tray app (Windows/Mac)
- Usage statistics dashboard
- Custom provider plugins
PRs welcome! See CONTRIBUTING.md.
See SECURITY.md.
MIT β free as in freedom. Do whatever you want.
π·πΊ Π§ΠΈΡΠ°ΡΡ Π½Π° ΡΡΡΡΠΊΠΎΠΌ
β Star this repo if it saves you money!
Made with π₯ by graysik & the open-source community


