Skip to main content

AI Gateway

Engineering

How we build the world's most widely used open-source AI Gateway. Routing, reliability, observability, and what we learn along the way.

We're hiring!

Routing to 100+ providers

OpenAIOpenAI|AnthropicAnthropic|Google GeminiGoogle Gemini|AWS BedrockAWS Bedrock|Azure OpenAIAzure OpenAI|Mistral AIMistral AI|Meta LlamaMeta Llama|GroqGroq|Hugging FaceHugging Face|PerplexityPerplexity|DeepSeekDeepSeek|CohereCohere|Together AITogether AI|Vertex AIVertex AI|OpenAIOpenAI|AnthropicAnthropic|Google GeminiGoogle Gemini|AWS BedrockAWS Bedrock|Azure OpenAIAzure OpenAI|Mistral AIMistral AI|Meta LlamaMeta Llama|GroqGroq|Hugging FaceHugging Face|PerplexityPerplexity|DeepSeekDeepSeek|CohereCohere|Together AITogether AI|Vertex AIVertex AI|

Model Fusion: 14/21 Tasks Solved vs 9/21 on One Model

Running three models on the same task and synthesizing their work solved 14 of 21 Terminal-Bench tasks against 9 for Claude Fable-5 alone. Total spend rose 36%, cost per solved task fell 12%, and turn latency went up 5x.

Tin Lo β€”

Auto-Router: Route on Context Size and Modality

The Auto-Router now supports more routing configurations: context-window escalation moves oversized prompts to the cheapest tier that fits them before dispatch, modality routing sends image requests to tiers that can see, classification can run on user turns only, and shadow evaluations can compare several router configs on a team's live traffic.

Tin Lo β€”

Shadow Evaluations: Test the Auto-Router on Your Own Production Traffic

Shadow evaluations duplicate a sampled slice of one key's live traffic through an auto-router and have an LLM judge blindly compare the answers. On our own traffic the router matched or beat the current model on 88.1% of judged responses, measured before a single user-facing response changed.

Tin Lo β€”

Auto Router: Opus level quality at up to 27% lower cost

On a 21 task subset of Terminal-Bench 2.0, an auto router matched Claude Opus-5 solve rate at 27% lower cost. Adding the last 3 user messages as classifier context raised relative quality 14% but cost 44% more; adding assistant replies made both worse.

Tin Lo β€”

AutoRouter: Easy Visibility to Your Savings

A new Auto-Router Usage tab in Cost Optimization, per-request classifier cost reporting, preset matching against your own deployments, and two routing fixes.

Tin Lo β€”

AutoRouter: 1 Click Deploy

Six changes to the Auto-Router: 1-click Anthropic and OpenAI presets, a one-line agent setup skill, Test Routing in the UI, a replaceable classifier prompt, customizable tiers, and configurable reminder markers.

Tin Lo β€”

Auto Router v1.97: usage benchmarks and better quality for lower cost

v1.97 adds cost and usage benchmarks for the auto router, gives the LLM classifier a window of prior turns, and turns session affinity off by default. Across 5,600 live classifier calls, prior turns raised tier agreement on referential follow-ups from 14% to 78% at under a tenth of a cent per request, with no measurable latency change.

Tin Lo β€”

Prompt Caching Works with Auto Router

The most common objection to auto-routing is that switching models throws away your prompt cache. We measured it across five datasets, including real gateway traffic with the provider's own cache accounting, and the answer is no.

Tin Lo β€”

Cut 75% Claude Code cost with near frontier model quality

Two independent evaluations of a four-tier Auto Router config against an all-frontier baseline: 8,619 graded prompts, 14,000 simulated real conversations, and what the cost and quality numbers actually depend on.

Tin Lo β€”