litellm/ui
Tin Chi Lo 703fde9f1e feat(proxy): add auto-router session benchmarks endpoint and UI
Adds GET /auto_router/benchmarks, an admin-only read over spend logs that
reports, per configured auto-router, the four session metrics customers ask
for (turns per session, average session length, tokens per session) plus a
routed-vs-baseline dollar savings estimate.

Session-scoped metrics can't come from the daily rollups because session_id
lives only on LiteLLM_SpendLogs, so this reads spend logs directly over a
window clamped to 30 days, matching the tool-spend endpoint. Spend is
filtered by the auto-router alias, which keeps the turn count honest: the
LLM classifier's own judge calls share the session but carry the judge
model's group, not the alias.

The savings figure compares the routed model mix against sending every
request to a single baseline model, defaulting to the priciest model the
router actually routed to in the window. A per-router benchmark_baseline_model
param pins it to a fixed flagship instead. The estimate uses list prices on
the tokens actually spent and does not model the caching a single-model
baseline would have had; the UI says so.

Surfaced as stat tiles on the Cost Optimization autorouter tab.
2026-07-29 20:38:35 -07:00
..
litellm-dashboard feat(proxy): add auto-router session benchmarks endpoint and UI 2026-07-29 20:38:35 -07:00
Dockerfile feat: add componentized proxy deployment with gateway, backend, ui, and migrations (#27557) 2026-05-16 09:25:17 -07:00
nginx.conf fix(ui): serve /ui/assets from the nginx image instead of SPA fallback (#34066) 2026-07-21 09:22:02 -07:00