Reverse proxy for routing chat/completions API requests to OpenAI-compatible LLMs
Top 79.9% on sourcepulse
This project provides a reverse proxy for routing chat and completions API requests to multiple LLM providers, including OpenAI, Groq, and local Ollama instances. It addresses the limitations of tools like Cursor, which struggle with integrating local models or easily switching between external providers. The primary benefit is enabling seamless access to a diverse range of LLMs through a single, configurable interface.
How It Works
LLM-router acts as a reverse proxy, intercepting API requests and forwarding them to different LLM backends based on configured model prefixes. It supports features like model aliasing (mapping client-recognized model names to specific backend models) and role rewrites (translating custom message roles to backend-compatible ones). This approach allows for optimized prompting strategies and ensures compatibility across various LLM providers and client applications.
Quick Start & Requirements
./llm-router-<os>-<arch>
.ngrok
for creating a public HTTPS endpoint for local models..env
file).spctl
to bypass Gatekeeper.config.json
to define backends and routing rules.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The project is distributed as pre-compiled binaries, but the license is not specified, which may impact commercial use. macOS users may encounter Gatekeeper issues requiring manual intervention. The effectiveness of "optimized reasoning prompts" relies on the client's implementation and the specific models used.
4 months ago
1 day