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

AreaIncluded
APIGET /health, GET /v1/models, POST /v1/chat/completions, GET /admin/usage
RuntimeFastAPI service with Docker Compose deployment
RoutingYAML model aliases with primary and fallback providers
GovernanceAPI key auth, in-memory rate limits, token and cost estimation
Agent handoffAGENT.md and CONTRACT.yaml for coding-agent integration
TestingPytest 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."}]
  }'