Switchboard
An LLM gateway: fallback, circuit breaker, token rate limits and a semantic cache

Live demo. The gateway and its Redis are real; the three AI providers are simulated, so nothing here calls or pays for a real model. Other visitors share this board.

Route of the last request

Waiting for traffic. Send a question or a burst below.

Swipe the board sideways to see the providers.

Providers, in fallback order

Break one for 60 seconds and watch the gateway route around it. After three failures in a row the breaker cuts the provider off for 30 s, then lets one request through to test it.

Send traffic

From the web app. Many are repeats or retyped, so the cache answers them without calling a provider.

60 long, uncacheable requests. The batch job hits its token limit and gets 429s; the web app keeps working.

Recent requests

Newest first. Click a row to light its route.
TimeClientQuestionRouteStatusLatencyTokens
No requests yet.

Call it from your own code

The gateway speaks the OpenAI API, so any OpenAI SDK works by changing the base URL. The demo key below only reaches the simulated providers.