LLM Gateway Starter
An OpenAI-compatible model gateway with routing, fallback, rate limits, usage accounting, and Docker Compose deployment.
Open source available FastAPIDocker ComposeOpenAI APIAgent-ready
LLM Gateway Starter is a production-oriented starter kit for teams that want one stable model entrypoint instead of scattered provider-specific calls across their codebase.
The gateway exposes an OpenAI-compatible API, so existing SDK clients can point to the gateway with a base_url change. Behind that API boundary, model aliases, fallback chains, rate limits, and usage accounting are configured in files that are easy for both developers and coding agents to inspect.
What Is Included
| Area | Included |
|---|---|
| API | GET /health, GET /v1/models, POST /v1/chat/completions, GET /admin/usage |
| Runtime | FastAPI service with Docker Compose deployment |
| Routing | YAML model aliases with primary and fallback providers |
| Governance | API key auth, in-memory rate limits, token and cost estimation |
| Agent handoff | AGENT.md and CONTRACT.yaml for coding-agent integration |
| Testing | Pytest suite and mock provider mode with no external API key required |
Repository
The source code is hosted on GitHub:
github.com/supernature885/ai-radar-llm-gateway-starter
Quick Start
cp .env.example .env
docker compose up --build
Then call the gateway:
curl http://localhost:8000/v1/chat/completions \
-H "Authorization: Bearer local-dev-key" \
-H "Content-Type: application/json" \
-d '{
"model": "default",
"messages": [{"role": "user", "content": "Explain the gateway in one sentence."}]
}'