Skip to content

Conversation

@yuneng-jiang
Copy link
Collaborator

@yuneng-jiang yuneng-jiang commented Nov 21, 2025

[Fix] UI - Hide Default Team Settings From Proxy Admin Viewers

Relevant issues

This PR hides the Default Team Settings Tab from Proxy Admin Viewers. Judging from the design, this tab was never intended to be seen by Proxy Admin Viewers as /get/default_team_settings will throw an error if you are not a proxy admin

This was causing some confusion among users because an error Notification stating "Failed to fetch team settings" will show up. The root cause is inside Default Team Settings, there is network call to /get/default_team_settings, only for it to return with an error, triggering

NotificationsManager.fromBackend("Failed to fetch team settings");

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🐛 Bug Fix
✅ Test

Changes

image image

Note

Hide the “Default Team Settings” tab for non-editing roles (e.g., proxy_admin_viewer) and harden daily spend update sorting to handle None values without errors.

  • UI:
    • Restrict visibility of Default Team Settings tab to isProxyAdminRole (Admin, proxy_admin) in components/OldTeams.tsx.
    • Add role helper isProxyAdminRole in utils/roles.ts.
    • Tests: add tab visibility tests in components/OldTeams.test.tsx and role helper tests in utils/roles.test.tsx.
  • Backend:
    • Update _update_daily_spend sorting in proxy/db/db_spend_update_writer.py to use .get(... ) or "" for date, api_key, model, custom_llm_provider to avoid None comparison errors.
    • Tests: add test_update_daily_spend_with_none_values_in_sorting_fields and validate existing sorting/upsert behavior in tests/test_litellm/proxy/db/test_db_spend_update_writer.py.

Written by Cursor Bugbot for commit 9dc684b. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Nov 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
litellm Ready Ready Preview Comment Nov 23, 2025 3:29am

@krrishdholakia krrishdholakia merged commit adfdcf1 into main Nov 24, 2025
45 of 58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants