Intelligence Phase 4 — Cost-Quality Frontier API + Public Site Visualizations
2026-03-19
What We Built
Added the cost-quality Pareto frontier as a public API endpoint (GET /v1/intelligence/frontier). This surfaces the router's internal CostQualityFrontier — the same data structure used for production routing decisions — as a public read-only API. Models on the Pareto frontier are those where no other model is both cheaper AND higher quality; dominated models are listed separately with their dominator.
Enhanced the /v1/intelligence/compare endpoint to include per-dimension scores (quality, speed, reliability, cost_efficiency) alongside the full ranking object, enabling richer side-by-side comparisons.
Added two new interactive sections to the public models page (site/models/index.html): a live intelligence leaderboard table with sortable columns and provider filtering, and a Canvas-rendered cost-quality scatter plot showing the Pareto frontier line.
Why It Matters
Developers choosing between 321 models need data-driven guidance, not marketing claims. The frontier endpoint answers "what's the cheapest model that's actually good?" directly from production telemetry. The public visualizations make this intelligence accessible without an API key, turning the models page into a live decision tool.
How It Works
The frontier endpoint delegates to CostQualityFrontier.getFrontier(shapeKey), the same Pareto computation that powers auto:floor routing. Rankings from the RankingEngine identify dominated models. The Canvas visualization fetches both endpoints client-side and renders an interactive scatter plot with logarithmic cost axis.
The Numbers
- 1 new endpoint, 1 enhanced endpoint
- 2 new interactive site sections (leaderboard + frontier chart)
- Both SDKs updated (TS + Python, sync + async)
- Full test coverage for frontier logic and enhanced compare
Competitive Edge
No other AI gateway publishes its internal routing intelligence as a public API. Portkey and OpenRouter show static benchmark data; BrainstormRouter shows live production Pareto frontiers that update as traffic flows through the system.
Lockstep Checklist
- [x] API Routes:
src/api/routes/intelligence.tsupdated with frontier endpoint + enhanced compare. - [x] TS SDK:
packages/sdk-tsupdated withfrontier()method andFrontierResponsetype. - [x] Python SDK:
packages/sdk-pyupdated withfrontier()method (sync + async). - [x] MCP Schemas: N/A — public read-only endpoint, no MCP tool needed.
- [x] Master Record: Covered by intelligence system entry.