Skip to content
AI Chat System

Static project demo

An LLM gateway you can inspect.

A FastAPI / Next.js reference implementation for provider failover, SSE streaming, caching and request guardrails. Explore the source and recorded evaluation results. Live model generation is not hosted.

Static files only · No model calls · No backend or database required

The implementation

The gateway remains available as source and an optional local application. These capabilities are implemented in Python; this public site presents their design and evidence.

Provider failover ↗

A provider chain records each attempt and tries configured fallbacks on authentication, quota, rate-limit, server and timeout errors.

Streaming & errors ↗

Server-Sent Events carry metadata, content deltas and a terminal event. Structured errors keep status codes and request IDs inspectable.

Optional caching ↗

An exact-match cache runs in memory when Redis is absent. Optional embedding similarity adds paraphrase reuse, with correctness tradeoffs exposed below.

Request guardrails ↗

Per-IP request limits, output caps and an in-process daily token budget bound local demo usage. Telemetry describes each request.

Evidence, including the limitations

Recorded 2026-09-09 10:57:49 UTC

56.6%

Semantic-cache precision

23 false positives across 68 labelled pairs. This adversarial result exposes wrong-answer reuse; it does not establish dependable semantic accuracy.

10/10

Failover checks passed

A simulated primary outage with real fallback calls in one historical run. A small sample of control flow, not an availability guarantee.

20/20

Streaming contracts passed

Recorded event-order and metadata checks across cache, miss and failover paths. Localhost timings on the eval page are not current hosted latency.

The evaluation page preserves the run target, commit with uncommitted changes, sample counts and historical provider cost estimates. Offline tests use test doubles separately; no new benchmark or synthetic transcript is presented here.

Read the full run and threshold-sweep caveats →

Run the gateway locally, optionally

The API boots without Redis or a database. Generating new answers or embeddings requires your own provider configuration and may incur provider charges. Credentials stay on the backend.

Local setup and original chat UI reference ↗
Public demo runtime: static HTML, CSS and JavaScript. Eligible free static hosting can serve it for $0; historical evaluation costs belong to the recorded run. No analytics or live provider integration is included.