feat(ui): warn in the Admin UI when no Redis is configured - #36495
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Greptile SummaryAdds a proxy readiness flag indicating whether the Admin UI should warn about missing coordination Redis
Confidence Score: 5/5The PR appears safe to merge with no concrete blocking or non-blocking defects identified The backend flag safely defaults to warning when Redis is absent, honors explicit suppression, and the shared dashboard query avoids duplicate concurrent requests
|
| Filename | Overview |
|---|---|
| litellm/proxy/health_endpoints/_health_endpoints.py | Adds the Redis-warning decision and exposes it through readiness details without changing readiness status |
| tests/test_litellm/proxy/health_endpoints/test_health_endpoints.py | Covers Redis presence, suppression values, and both Prisma readiness response branches |
| ui/litellm-dashboard/src/app/(dashboard)/hooks/healthReadiness/useHealthReadinessDetails.ts | Extends the readiness response interface with the optional warning flag |
| ui/litellm-dashboard/src/app/(dashboard)/layout.tsx | Mounts the warning in both dashboard shell variants using the existing shared readiness query |
| ui/litellm-dashboard/src/components/NoRedisWarningBanner.tsx | Renders the warning only when requested by the proxy and provides configuration guidance |
| ui/litellm-dashboard/src/components/NoRedisWarningBanner.test.tsx | Verifies visibility, documentation link, suppression guidance, and access-token forwarding |
Reviews (1): Last reviewed commit: "feat(ui): warn in the Admin UI when no R..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Verified end to end against a local proxy + Admin UI (feature branch on :4000/:3000, base branch on :4001/:3001). Before (base branch, no Redis) — no banner: After (this branch, no Redis) — banner on every page: Banner disappears with a Redis cache configured ( …and with Testing also caught that |
|
bugbot run |
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 48fa4a0. Configure here.
| @@ -0,0 +1,75 @@ | |||
| --- | |||
| name: testing-admin-ui-banners | |||
There was a problem hiding this comment.
remove this file, unnecessary
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
TLDR
Problem this solves:
How it solves it:
LITELLM_DISABLE_NO_REDIS_WARNING=truehides it for single-worker setupsUser Flow
Before: an admin running the proxy with 4 workers and no Redis sees nothing wrong, while a 100 rpm key actually serves 400 rpm
REDIS_HOST/REDIS_URL,--num_workers 4rpm_limit: 100and send 400 requests in a minute, all of which succeedAfter: the same admin is told on every UI page that Redis is missing, and what that costs them
router_settings.redis_hostblock, a Rediscache_paramsblock, orgeneral_settings.coordination_redis), restart, reload the UI, and the banner is goneLITELLM_DISABLE_NO_REDIS_WARNING=true, restarts, and the banner is goneRelevant issues
Linear ticket
Pre-Submission checklist
Screenshots / Proof of Fix
Before and after screen recording, captured on the base branch at 79d412e and on this branch at 48fa4a0, is in the Slack thread: https://berriaillm.slack.com/archives/C0B302ZJU05/p1786413555538489?thread_ts=1786413555.538489&cid=C0B302ZJU05
UI change, so here is what to run and where to look:
env -u REDIS_HOST -u REDIS_PORT -u REDIS_URL python litellm/proxy/proxy_cli.py --config litellm/proxy/dev_config.yaml --detailed_debug --reload 2>&1 | tee litellm.logcurl -s http://localhost:4000/health/readiness/details -H "Authorization: Bearer sk-1234" | jq .show_no_redis_warningshould printtruenpm run devinui/litellm-dashboard, open http://localhost:3000/ui/?page=api-keys and expect the red "No Redis configured. Redis is highly recommended" banner under the header, with a working docs linkrouter_settings.redis_host/redis_port(or a Rediscache_paramsblock) pointed atdocker run -d -p 6379:6379 redis:7, reload the page, and the banner is gone (step 2 now printsfalse)LITELLM_DISABLE_NO_REDIS_WARNING=true, reload, and the banner is goneType
🆕 New Feature
Caveats (if any)
REDIS_*env vars with no Redis in the config still warnLink to Devin session: https://app.devin.ai/sessions/c91185109405404bbb87c4967a1346b0
Requested by: @mateo-berri