DEV Community

9router: route Claude Code, Cursor, or Copilot through whichever free tier you've got

Follow
9router is a local proxy that exposes a single OpenAI-compatible endpoint, routing requests to various AI providers. It helps manage costs by spreading requests across different free tier accounts like Copilot, Gemini, and Ollama. The core feature, "Combos," allows round-robin or sticky-round-robin usage of multiple providers, offering increased throughput. "RTK" filters noisy outputs from tools like `ls` and `git diff` before returning them to the LLM, saving tokens. "Caveman mode" compresses instruction prompts to reduce token usage. "Antigravity" intercepts Copilot traffic for routing through 9router, requiring a MITM setup. The architecture includes translators to adapt between OpenAI format and native APIs of different providers. This setup allows for efficient resource allocation and cost management in your AI tool usage. 9router can also be deployed edge-side using Cloudflare workers for team access. However, users should be aware of potential TOS violations and variable free tier performance. Ultimately, 9router provides a comprehensive solution for optimizing the use of AI coding tools, offering a more architectural approach to cost management.
favicon
dev.to
dev.to
Create attached notes ...