DEV Community

Linh
Linh

Posted on

I Built Routiform After Hitting Every Limit with 9router and OmniRoute

The Problem: Gateway Fatigue is Real

If you're reading this, you've probably been there:

  • 9router looks promising with 2,200+ stars, but you spend more time debugging Docker builds than actually using it
  • OmniRoute has cool features, but GitHub Copilot authentication is broken, the production build crashes on macOS, and you keep getting stuck at /login after restoring backups

I spent 3 months dealing with these issues before deciding: "Screw it, I'll build my own."

Enter Routiform — an AI gateway that fixes the bugs 9router and OmniRoute left behind.


🔥 What Routiform Fixes (That Others Don't)

1. Docker That Actually Works

9router Issue #538: "Add Docker support and improve Dockerfile configuration"

OmniRoute Issue #1081: "Critical: Broken production build on macOS (absolute symlinks, missing modules)"

These were deal-breakers. After countless hours debugging, Routiform's Docker CLI image works out of the box:

docker pull linhnguyen0944/routiform:cli
docker run -d -p 20128:20128 -p 20129:20129 linhnguyen0944/routiform:cli
Enter fullscreen mode Exit fullscreen mode

No symlink issues. No missing modules. Just works — with CLI tool configs auto-mounted.

2. Stuck Login After Backup? Fixed.

The Bug: Import a backup → get redirected to /login → can't access anything

Both 9router and OmniRoute have this issue. Routiform now auto-loads server.env on npm install and allows settings access when no password is configured — no more lockouts.

// Routiform fix: Auto-generate JWT secret when not configured
fix(jwt): auto-generate secret when JWT_SECRET is not set
Enter fullscreen mode Exit fullscreen mode

3. Context Compression That Doesn't Break

OmniRoute Issue #1018: "Chat completion costs ($0) never recorded"

9router Issue #536: "Unsupported parameter: 'temperature'"

Routiform implements context window validation and compression with metrics tracking. Your requests don't get dropped, and costs are actually recorded.

feat(context): add context window validation and compression
Enter fullscreen mode Exit fullscreen mode

4. GitHub Copilot Works (Finally!)

OmniRoute Issue #1066: "Github Copilot can't be used"

This was a nightmare. OAuth would fail randomly, and client_id parameter was empty in authorization URLs. Routiform hardens the OAuth flow and syncs live model catalogs properly.

5. Models That Auto-Sync

Tired of manually updating model lists? Routiform auto-syncs and refreshes available models from providers:

feat(providers): auto-sync and refresh available models
Enter fullscreen mode Exit fullscreen mode

6. Better Claude /v1/messages Compatibility

9router Issue #545: "[400]: Improperly formed request in Kiro Provider"

Routiform hardens the /v1/messages compatibility and ordering, fixing issues with Claude Code, Kiro, and other OAuth-based providers.


🎯 The Numbers Don't Lie

Feature 9router OmniRoute Routiform
Docker Works Out-of-Box
Auto-Generate JWT
Context Compression
GitHub Copilot OAuth
Auto-Sync Models
Claude v1/messages Fix
Stuck Login Fix
30 Languages i18n
MCP Server (25 tools)
A2A Protocol

🚀 How Routiform Works

┌─────────────┐
│  Your CLI   │  (Claude Code, Codex, Gemini CLI, Cursor, Cline...)
│   Tool      │
└──────┬──────┘
       │ http://localhost:20128/v1
       ↓
┌─────────────────────────────────────────┐
│           Routiform (Smart Router)      │
│  • Format translation (OpenAI ↔ Claude) │
│  • Quota tracking + Embeddings + Images │
│  • Auto token refresh                   │
│  • Context compression                  │
│  • Auto model sync                      │
└──────┬──────────────────────────────────┘
       │
       ├─→ [Tier 1: SUBSCRIPTION] Claude Code, Codex, Gemini CLI
       │   ↓ quota exhausted
       ├─→ [Tier 2: API KEY] DeepSeek, Groq, xAI, Mistral, NVIDIA NIM
       │   ↓ budget limit
       ├─→ [Tier 3: CHEAP] GLM ($0.6/1M), MiniMax ($0.2/1M)
       │   ↓ budget limit
       └─→ [Tier 4: FREE] Qoder, Qwen, Kiro (unlimited)
Enter fullscreen mode Exit fullscreen mode

One config, unlimited models and quota.


🛠️ Quick Start

Option 1: NPM (Recommended)

# Install globally
npm install -g routiform

# Start the server
routiform

# Access dashboard
open http://localhost:20128
Enter fullscreen mode Exit fullscreen mode

Option 2: Docker (CLI Mode)

# Pull the CLI image
docker pull linhnguyen0944/routiform:cli

# Run with full configuration
docker run -d \
  --name routiform \
  --restart unless-stopped \
  -p 20128:20128 \
  -p 20129:20129 \
  -e DATA_DIR=/app/data \
  -e INITIAL_PASSWORD="change-this-password" \
  -v routiform-data:/app/data \
  -v "$HOME/.claude:/root/.claude" \
  -v "$HOME/.openclaw:/root/.openclaw" \
  -v "$HOME/.config/opencode:/root/.config/opencode" \
  -v "$HOME/.continue:/root/.continue" \
  linhnguyen0944/routiform:cli
Enter fullscreen mode Exit fullscreen mode

Option 3: Source

git clone https://github.com/linhnguyen-gt/Routiform.git
cd Routiform
npm install
npm run dev
Enter fullscreen mode Exit fullscreen mode

🔧 Connect Your Favorite Tools

Routiform works with all major AI coding agents:

Tool Connection
Claude Code http://localhost:20128/v1
Codex CLI http://localhost:20128/v1
Gemini CLI http://localhost:20128/v1
Cursor OpenAI-compatible endpoint
Cline Custom base URL
OpenCode http://localhost:20128/v1

💡 Why I Built This

After 3 months of:

  • Debugging Docker builds
  • Getting stuck at login screens
  • Fighting with OAuth that wouldn't work
  • Watching requests fail silently

I realized the existing solutions had great ideas but terrible execution.

Routiform is my answer: an AI gateway that just works. No more 3am debugging sessions. No more "why the hell is this not working?" moments.


📊 Real Impact

Since launching 4 days ago, Routiform has already solved:

  • 11 authentication/authorization bugs fixed
  • 8 provider-specific issues (Claude, Codex, Kiro, Qoder) resolved
  • Context compression preventing dropped requests
  • Auto-sync eliminating manual model updates

🤝 Credits

Routiform wouldn't exist without the foundations laid by:

  • 9router by @decolua — The original inspiration (2,206 ⭐)
  • OmniRoute by @diegosouzapw — Expanded the vision

I forked from these projects and fixed the bugs they left behind.


🎁 Try It Yourself

NPM (Recommended for development)

npm install -g routiform
routiform
Enter fullscreen mode Exit fullscreen mode

Docker (For production/deployment)

docker pull linhnguyen0944/routiform:cli
docker run -d \
  --name routiform \
  --restart unless-stopped \
  -p 20128:20128 \
  -p 20129:20129 \
  -v routiform-data:/app/data \
  -v "$HOME/.claude:/root/.claude" \
  -v "$HOME/.config/opencode:/root/.config/opencode" \
  linhnguyen0944/routiform:cli
Enter fullscreen mode Exit fullscreen mode

Then open http://localhost:20128 and experience an AI gateway that actually works.


🔗 Links


Have you hit similar bugs with 9router or OmniRoute? Drop a comment — I'd love to hear your war stories! 💬

Top comments (0)