Internal AI Gateway — Documentation

Lattice

One OpenAI-compatible API fronting five providers. The gateway holds provider credentials, decides which one handles a request, retries a fallback when one fails, and records what happened — without any of that bookkeeping blocking the response a client sees.

topology.txt
Application A └
Application B ├──▸ Lattice ▸── OpenAI / Anthropic / Google / Ollama / vLLM
Application C ┘

Why Lattice

04 Capabilities
01

One API

OpenAI-compatible

A single /v1/chat/completions endpoint fronts five providers. Swap or add a provider without touching client code.

02

Failover

Automatic

Five consecutive failures opens a per-provider circuit; requests route around it until a 30-second cooldown elapses.

03

Policy

Per application

Model allowlists, monthly token quotas, per-minute rate limits, and routing strategy are enforced on every request.

04

Observability

Built-in

Every request is logged with provider, latency, attempts, and estimated cost — queryable through the dashboard.

Documentation

8 Sections
LATTICE — INTERNAL AI INFRASTRUCTURE
GITHUB © 2026