feat(ui): direction picker and reverse-mode display for shadow evals - #36994
Conversation
Greptile SummaryThe PR adds reverse shadow-evaluation controls and direction-aware result presentation to the cost-optimization dashboard.
Confidence Score: 4/5The reverse result rendering appears correct, but the baseline option source must be fixed so supported custom models and aliases do not make the new workflow unusable. The API accepts configured router-resolvable models and aliases, while the new required picker exposes only models in the static public cost map, leaving valid reverse jobs impossible to start from the dashboard. Files Needing Attention: ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/ShadowEvalSection.tsx
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/ShadowEvalSection.tsx | Adds reverse-mode form and display behavior, but sourcing baselines solely from the public cost map excludes valid configured models and aliases. |
| ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/ShadowEvalSection.test.tsx | Adds meaningful coverage for reverse submission and arm-label rendering, but uses only a public cost-map model and does not cover configured custom baselines. |
Reviews (1): Last reviewed commit: "feat(ui): direction picker and reverse-m..." | Re-trigger Greptile
| if (!costMap) return []; | ||
| const chatModels = Object.entries(costMap as Record<string, CostMapEntry>) | ||
| .filter(([, value]) => value?.mode === "chat" && value?.litellm_provider) | ||
| .map(([key, value]) => (key.startsWith(`${value.litellm_provider}/`) ? key : `${value.litellm_provider}/${key}`)); |
There was a problem hiding this comment.
Baseline picker omits configured models
If the intended baseline is a configured custom model or model-group alias absent from the public cost map, useBaselineModelOptions omits that API-supported identifier, causing the required baseline field to remain empty and preventing the operator from starting the reverse evaluation.
Knowledge Base Used:
There was a problem hiding this comment.
Fixed in e46def9: the picker now lists configured non-auto-router model groups first, then the public catalog.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
e46def9 to
0672aa1
Compare
|
@greptileai can you reply here with score & why |
|
bugbot run |
|
Score: 4/5 The implementation is clean and well-tested. Here's the breakdown: What's done well:
Minor issues holding it from 5/5:
None of these are blockers — the feature logic and tests are solid. |
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 0672aa1. Configure here.
TLDR
Problem this solves:
How it solves it:
User Flow
Before: an operator whose key already runs on an auto-router wants to check the router still beats a strong fixed model, and the dashboard offers no way to ask
"direction": "reverse"and"baseline_model": "..."After: the same operator starts and reads a reverse eval entirely from the page
Relevant issues
Linear ticket
Part of LIT-5538
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
UI change, QA runbook to capture screenshots:
npm run devin ui/litellm-dashboardType
🆕 New Feature
Note
Cursor Bugbot is generating a summary for commit 0672aa1. Configure here.