feat(ui): add cost optimization feedback banner to models page - #32174
Conversation
Surfaces a dismissible banner on Models + Endpoints prompting users to share cost optimization feedback (routing, budgets, etc) via a GitHub discussion.
|
|
Greptile SummaryThis PR replaces the inline "Missing a provider?" banner in the Models + Endpoints page with a new, reusable
Confidence Score: 5/5Safe to merge — the change is additive UI work with no backend impact, no auth touches, and no regressions introduced. The change is a straightforward UI refactor: inline banner logic is extracted into a small, well-tested component. The localStorage guard, dismissal flow, and test coverage are all correct. No existing functionality other than the previously discussed "Request Provider" compact link is removed, and that removal is intentional and documented. No files require special attention.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/components/molecules/cost_optimization_feedback_banner.tsx | New self-contained dismissible banner component with localStorage persistence; clean extraction with constants and SSR guard matching existing codebase patterns |
| ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/ModelsAndEndpointsView.tsx | Replaces inline "Missing a provider?" banner and its state/compact-link logic with the new CostOptimizationFeedbackBanner component; removes unused PlusCircleOutlined import |
| ui/litellm-dashboard/src/components/molecules/cost_optimization_feedback_banner.test.tsx | New unit tests covering render, dismiss interaction with localStorage write, and remount persistence; uses beforeEach cleanup to isolate tests |
| ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/ModelsAndEndpointsView.test.tsx | Tests updated to reflect new banner text, new localStorage key, and removal of the compact "Request Provider" link; replaces the removed test case with an equivalent remount-persistence check |
Reviews (2): Last reviewed commit: "test(ui): update Models+Endpoints banner..." | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f55abf0000
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| </div> | ||
| )} | ||
| {/* Cost Optimization Feedback Banner */} | ||
| <CostOptimizationFeedbackBanner /> |
There was a problem hiding this comment.
Preserve the provider request CTA
This replacement removes both the Missing provider banner and its compact Request Provider fallback; repo-wide rg "models\\.litellm\\.ai/\\?request=true|Request Provider" ui/litellm-dashboard now finds only tests, so the Models + Endpoints page no longer gives users a path to request an unsupported provider. If the intent is just to add cost-optimization feedback, keep the provider-request CTA somewhere instead of replacing it entirely.
Useful? React with 👍 / 👎.
| </button> | ||
| </div> | ||
| )} | ||
| {/* Cost Optimization Feedback Banner */} |
There was a problem hiding this comment.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…banner Missing Provider banner tests are replaced since that banner was removed in favor of the new always-on cost optimization feedback banner.
|
@greptileai review |
Relevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewDelays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
To verify: start the proxy on localhost:4000 with any config, and the dashboard dev server (npm run dev in ui/litellm-dashboard). Log into the UI, go to
Models + Endpoints. A dismissible banner titled "Help shape cost optimization" appears at the top of the page with a "Share Feedback" button linking to #32172. It stays visible across the All Models / Add Model / Add Auto Router tabs (single instance, not duplicated), and dismissing it persists via localStorage across reloads.Type
🆕 New Feature
Changes
Adds a dismissible banner on the Models + Endpoints page asking users for feedback on cost optimization improvements (routing, budgets, and more), linking out to a new GitHub discussion. Previously this lived only behind an Auto Router-specific banner that showed up twice when an auto-router model was configured while on the Add Auto Router tab; this replaces it with a single, always-present banner with broader scope. The prior "Missing a provider?" banner and its Request Provider fallback link are intentionally removed as part of this change.