Status: [UNTESTED] Endpoints found: http://localhost:8080/v1/chat/completions http://localhost:8080/api/keys http://your-vps:8080/api/keys http://localhost:8080/api/keys/ak_12345 Source: https://github.com/fanioz/minirouter # MiniRouter - Multi-Provider Native AOT LLM Router A minimal ASP.NET Core reverse proxy supporting **multiple OpenAI-compatible providers** with round-robin routing, published as a Native AOT binary. ## Why MiniRouter? Built for developers who want robust LLM routing without the bloat. Thanks to .NET Native AOT, MiniRouter is incredibly lightweight and lightning-fast: - **Minimal Footprint:** Idles at just **~50 MB** RAM and peaks at **~75 MB** under sustained load (500 concurrent connections). - **Micro-VPS Ready:** Tested and proven to run flawlessly on tiny $5/month VPS instances (512MB RAM, 0.5 vCPU) with 0% OOM kills. - **Zero Dependencies:** Compiles to a single, self-contained native binary. No .NET runtime, Node.js, or fat containers required. - **Blazing Fast:** No JIT warmup overhead and no reflection, ensuring instant startup times and minimal latency. Drop heavy proxies that consume 600MB+ of RAM. Deploy MiniRouter and save your server resources for your actual workloads. ## Configuration Copy the example config and fill in your keys (the real `providers.json` is gitignored): ```bash cp providers.example.json providers.json ``` Set `PROVIDERS_CONFIG_PATH` (default: `./providers.json`) to point to your providers JSON file. ```bash export PROVIDERS_CONFIG_PATH="./providers.json" export MAX_RETRIES="2" export CIRCUIT_FAILURE_THRESHOLD="3" export CIRCUIT_COOLDOWN_SECONDS="30" ./publish/MininRouter ``` ### Environment Variables | Variable | Default | Description | |---|---|---| | `PROVIDERS_CONFIG_PATH` | `./providers.json` | Path to the JSON file storing providers | | `MAX_RETRIES` | `2` | Maximum number of times to retry a failed request against another provider | | `CIRCUIT_FAILURE_THRESHOLD` | `3` | Number of consecutive failures before a provider is temporarily excluded from routing | | `CIRCUIT_COOLDOWN_SECONDS` | `30` | Number of seconds a failing provider is kept out of rotation before half-opening | | `MODELS_CACHE_TTL_SECONDS` | `300` |