fix(ui): render team and org tpm/rpm limits of 0 as 0 instead of Unlimited - #37916
Merged
yuneng-berri merged 2 commits intoAug 24, 2026
Merged
Conversation
…mited A tpm_limit or rpm_limit of 0 is a hard block on the backend (every request 429s) and only null means unlimited, but the team and organization views rendered both as "Unlimited" (and a team-member limit of 0 as "No Limit") because every display site used a falsy || fallback. The team member edit dialog also seeded its form with `tpm_limit || null`, so opening Edit Member on a member stored with 0 and clicking Save sent null to /team/member_update and silently turned the hard block into unlimited Every limit display site in TeamInfo, organization_view, the organizations list cell and the team members table now uses a nullish check, and both member form seeding paths keep 0 for max_budget_in_team, tpm_limit and rpm_limit. Regression tests cover each site and the existing memberFormValues test that asserted 0 -> null is flipped to assert 0 survives Resolves LIT-5760
Contributor
Greptile SummaryThis PR preserves explicit zero-valued team, organization, and member limits throughout dashboard rendering and member form submission
Confidence Score: 5/5The PR appears safe to merge No blocking failure remains
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/components/team/TeamMemberTab.test.tsx | The previous nested fixture mutation is fully replaced with immutable map and spread construction |
| ui/litellm-dashboard/src/components/team/TeamMemberTab.tsx | Member limit rendering and edit payload construction now distinguish zero from an absent limit |
| ui/litellm-dashboard/src/components/team/memberFormValues.ts | Member form seeding now preserves explicit zero-valued budgets and rate limits |
| ui/litellm-dashboard/src/components/team/TeamInfo.tsx | Team overview and settings displays now render zero limits without treating them as unlimited |
| ui/litellm-dashboard/src/components/organization/organization_view.tsx | Organization overview and settings displays now distinguish zero limits from null |
| ui/litellm-dashboard/src/app/(dashboard)/organizations/_components/OrganizationsTableColumns.tsx | Organization table limit cells now render explicit zero values correctly |
Reviews (2): Last reviewed commit: "test(ui): assert a stored 0 member limit..." | Re-trigger Greptile
tin-berri
approved these changes
Aug 22, 2026
The EditMembership integration test named the old 0 -> null collapse as the expected payload, so the related-tests CI job went red once the form kept 0. It now asserts 0 survives and only the empty budget_duration collapses to null. The TeamMemberTab fixture is built with a map instead of mutating the nested membership
Contributor
Author
yuneng-berri
enabled auto-merge (squash)
August 23, 2026 05:37
yucheng-berri
approved these changes
Aug 23, 2026
ryan-crabbe-berri
approved these changes
Aug 24, 2026
yuneng-berri
merged commit Aug 24, 2026
5b1c142
into
litellm_internal_staging
67 of 68 checks passed
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:
User Flow
Before: an admin who set a team's TPM limit to 0 to block it sees the team described as unlimited, and re-saving a blocked member quietly unblocks them
{"team_id": "...", "tpm_limit": 0}and get backtpm_limit: 0"tpm_limit": null, and that member's hard block is goneAfter: the same admin sees the 0 they set, and saving a member without touching the limit leaves it at 0
{"team_id": "...", "tpm_limit": 0}and get backtpm_limit: 0"tpm_limit": 0, and the member stays blockedRelevant issues
Linear ticket
Resolves LIT-5760
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Delays 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
Shared setup, against a local proxy on :4000 with the dashboard dev server on :3000
Before (7481649)
Team overview renders 0 as Unlimited
tpm-zeroEdit Member rewrites 0 to null
/team/member_updaterequest body in the browser network tab carries"tpm_limit": nullAfter (d124a00)
Team overview renders 0 as Unlimited
tpm-zeroEdit Member rewrites 0 to null
/team/member_updaterequest body carries"tpm_limit": 0Type
🐛 Bug Fix
Caveats (if any)
Final Attestation