Routing Brain Dashboard + Home Page Live — 6 Intelligence Sections, 3 New Endpoints

2026-03-20

What We Built

A full Routing Brain dashboard page with 6 sections that surface every layer of BrainstormRouter's routing intelligence: strategy toggle (auto/manual/cascade), Thompson sampling scatter plot, model selection history table, cascade activation log, circuit breaker map grouped by provider, and a cost-quality Pareto frontier chart. This is the flagship intelligence page — no competitor exposes this level of routing transparency.

The home page was enhanced with a 6th stat card, a live request ticker (scrolling feed of recent API calls with model, cost, latency, and status), and SSE-ready hooks for real-time updates. Three new API endpoints power the data: routing decisions, cascade activations, and guardian aggregate stats.

Both TypeScript and Python SDKs received new methods for all three endpoints, maintaining full lockstep.

Why It Matters

Every AI gateway routes requests, but none show you _how_ they route or _why_. BrainstormRouter's Routing Brain makes the invisible visible: customers can see Thompson sampling explore/exploit tradeoffs in real time, watch cascade fallbacks fire when a provider goes down, and inspect the Pareto frontier to understand cost-quality tradeoffs across their model fleet. This is the "show your work" moment that turns a commodity proxy into an intelligence platform.

For operators, the live ticker and guardian stats provide instant situational awareness without digging through logs. The circuit breaker map is a single-glance health overview of every endpoint across every provider.

How It Works

The routing brain page fetches four data sources in parallel on load:

  • Bandit stats — Thompson sampling arm data (quality EWMA, cost per 1K, sample count)
  • Ops status — Circuit breaker state for all endpoints
  • Routing decisions — Recent requests with full decision trace metadata
  • Cascade activations — Requests where the router escalated through quality tiers

Pure logic functions (computeParetoFrontier, groupEndpointsByProvider) are exported separately for testing. The Pareto frontier algorithm sorts arms by cost and sweeps for monotonically increasing quality — any arm below the running max quality is dominated.

// SDK usage
const br = new BrainstormRouter({ apiKey: "br_..." });

// Routing decisions with trace metadata
const { decisions } = await br.routing.getDecisions({ limit: 50 });

// Cascade fallback history
const { cascades } = await br.routing.getCascades({ limit: 20 });

// Guardian overhead and cache stats (24h)
const stats = await br.ops.getGuardianStats();
console.log(`Cache hit rate: ${(stats.cacheHitRate * 100).toFixed(1)}%`);

The Numbers

  • 6 dashboard sections on the routing brain page — most comprehensive routing UI in the market
  • 3 new API endpoints with full SDK coverage (TS + Python)
  • 200-entry live ticker with mouse-pause support and automatic cleanup
  • Pareto frontier computed client-side from bandit arm data — zero server overhead
  • 0 new dependencies — built entirely on existing chart/DOM primitives

Competitive Edge

Portkey shows a model dropdown. OpenRouter shows a leaderboard. Neither shows you the _decision process_ — which models were candidates, why one was chosen, what the fallback chain looked like, or where each model sits on the cost-quality frontier. BrainstormRouter's Routing Brain is the first dashboard that treats routing as intelligence worth inspecting, not plumbing to hide. The live ticker and circuit breaker map give operators the same real-time awareness that SREs expect from infrastructure dashboards, applied to AI routing for the first time.

Lockstep Checklist

> _You MUST check these boxes [x] and verify the corresponding files are updated BEFORE committing this log._

  • [x] API Routes: src/api/routes/auth-routing.ts updated with 3 endpoints.
  • [x] TS SDK: packages/sdk-ts updated with routing.getDecisions(), routing.getCascades(), ops.getGuardianStats().
  • [x] Python SDK: packages/sdk-py updated with routing.get_decisions(), routing.get_cascades(), ops.get_guardian_stats().
  • [x] MCP Schemas: Not applicable (dashboard-facing endpoints, not agent-facing).
  • [x] Master Record: docs/architecture/master-capability-record.md reflects this capability.