fix: expired-miss share over all measured turns + cost-optimization tab labels - #36037
Merged
Merged
Conversation
Contributor
Greptile SummaryThe PR changes the expired-miss percentage to use all bucketed measured turns and shortens two cost-optimization tab labels.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/autoRouterBenchmarks.ts | Updates the expired-miss denominator to the combined measured-turn bucket total and preserves null only for an empty dataset. |
| ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/AutoRouterBenchmarksTab.tsx | Makes the full expired-miss row a focusable tooltip trigger and updates its explanation to match the new metric. |
| ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/CostOptimizationView.tsx | Shortens the visible Usage and Auto-Router Usage tab labels without changing their stable keys or content. |
| ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/autoRouterBenchmarks.test.ts | Covers the revised denominator, zero-expired-miss behavior, and no-measured-turn case. |
| ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/AutoRouterBenchmarksTab.test.tsx | Verifies the revised displayed percentage, zero row, empty state, and focusable full-row trigger. |
| ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/CostOptimizationView.test.tsx | Updates tab rendering and selection assertions for the shortened labels. |
Reviews (2): Last reviewed commit: "fix: auto-router expired-miss percentage..." | Re-trigger Greptile
tin-berri
force-pushed
the
litellm_expired_miss_tooltip
branch
from
August 6, 2026 04:49
9c00692 to
7d40067
Compare
tin-berri
enabled auto-merge (squash)
August 6, 2026 04:58
…bels - change expired-miss percentage denominator from return-to-tier misses to all measured turns (same_model + first_visit + return_to_tier). when auto-routers flip tiers rapidly within TTL, return-to-tier turns become hits and disappear from the miss count; the old metric reported only the rare failure population. the new metric contextualizes that population as a share of overall coverage - rename usage tab from 'Usage' to 'Overall' - rename auto-router-usage tab from 'Auto-Router Usage' to 'Auto-Router' - update component and unit tests to match new semantics
tin-berri
force-pushed
the
litellm_expired_miss_tooltip
branch
from
August 6, 2026 05:09
7d40067 to
e8cd1b5
Compare
Contributor
|
bugbot run |
Contributor
Contributor
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit e8cd1b5. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
How it solves it:
Relevant issues
Follow-up to #35995, which introduced the caching card and expired-miss stat
Linear ticket
Pre-Submission checklist
Screenshots / Proof of Fix
Live verification at http://localhost:3000/cost-optimization/ (Auto-Router tab):
Unit tests: 91/91 pass, mutation check confirms the formula change is locked by tests
Type
Bug Fix
Changes
autoRouterBenchmarks.ts: expired-miss percentage now computed as (expired_misses / all_measured_turns) instead of (expired_misses / return_to_tier_misses)CostOptimizationView.tsx: tab labels renamed to 'Overall' and 'Auto-Router'autoRouterBenchmarks.test.tsandAutoRouterBenchmarksTab.test.tsx: updated assertions to match new denominator and label namesQA runbook
python litellm/proxy/proxy_cli.py --config litellm/proxy/dev_config.yaml --detailed_debug --reload --use_v2_migration_resolver) and the dashboard (npm run devinui/litellm-dashboard)Final Attestation
Note
Low Risk
Dashboard-only analytics display and label changes with unit tests; no API or auth changes.
Overview
Auto-router cache “Expired-miss” now uses all measured turns (same model + first visit + return to tier) as the denominator instead of only return-to-tier misses, so the percentage reflects TTL-related misses as a share of overall coverage (e.g. fixture drops from ~27% to ~2.3%). The row stays visible at 0.0% when there are measured turns but no expired misses, and is hidden only when no turns were measured.
The expired-miss row is a single focusable tooltip trigger (button) for the whole label + value, with tooltip copy updated to describe the new definition.
Cost Optimization tab labels are shortened: Usage → Overall and Auto-Router Usage → Auto-Router, with matching test updates in
expiredMissShare,AutoRouterBenchmarksTab, andCostOptimizationView.Reviewed by Cursor Bugbot for commit e8cd1b5. Bugbot is set up for automated code reviews on this repo. Configure here.