Configuration
FreeLLM is configured entirely via environment variables. The full list with sensible defaults:
Provider API keys
Each accepts a single key or a comma-separated list (see Multi-Key Rotation).
GROQ_API_KEY=GEMINI_API_KEY=MISTRAL_API_KEY=CEREBRAS_API_KEY=NVIDIA_NIM_API_KEY=OLLAMA_BASE_URL=http://localhost:11434Circuit breaker
CB_FAILURE_THRESHOLD=3 # consecutive failures before tripping openCB_SUCCESS_THRESHOLD=2 # successes in half-open to recoverCB_TIMEOUT_MS=30000 # wait before half-open retryRouting timeout
ROUTE_TIMEOUT_MS=30000 # max time to try all providers before giving upPer-client rate limiting
RATE_LIMIT_RPM=60 # requests per IP per windowRATE_LIMIT_WINDOW_MS=60000 # window size in msSecurity
FREELLM_API_KEY= # require Bearer token (timing-safe comparison)FREELLM_ADMIN_KEY= # separate key for status mutations (reset, routing)ALLOWED_ORIGINS= # comma-separated CORS originsWhen FREELLM_API_KEY is empty, all requests pass through (good for local dev). When set, every non-health request must include Authorization: Bearer <key>.
Logging
LOG_LEVEL=info # pino log level: trace, debug, info, warn, errorNODE_ENV=development # set to "production" on deployment