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)