[Feature] UI - User Budget Page: Unlimited Budget Checkbox - #20380
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile OverviewGreptile SummaryThis PR adds an "Unlimited Budget" checkbox to the user edit form, allowing administrators to set a user's Key Changes:
Test Coverage:
Code Quality:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/components/user_edit_view.tsx | Added unlimited budget checkbox feature that allows setting max_budget to null with proper state management and form validation |
| ui/litellm-dashboard/src/components/user_edit_view.test.tsx | Comprehensive test coverage for the unlimited budget feature including edge cases, form validation, and state changes |
Sequence Diagram
sequenceDiagram
participant User
participant UserEditView
participant Form
participant State
participant SubmitHandler
Note over UserEditView: Component Initialization
UserEditView->>State: useState(false) for unlimitedBudget
UserEditView->>Form: Form.useForm()
Note over UserEditView: useEffect on userData change
UserEditView->>State: Check if max_budget is null/undefined
State-->>UserEditView: isUnlimited status
UserEditView->>State: setUnlimitedBudget(isUnlimited)
UserEditView->>Form: setFieldsValue({ max_budget: isUnlimited ? "" : maxBudget })
alt User checks "Unlimited Budget" checkbox
User->>UserEditView: Click checkbox
UserEditView->>State: handleUnlimitedBudgetChange(checked=true)
State->>State: setUnlimitedBudget(true)
State->>Form: setFieldsValue({ max_budget: "" })
State->>UserEditView: Update UI
UserEditView-->>User: Disable budget input
else User unchecks "Unlimited Budget" checkbox
User->>UserEditView: Click checkbox
UserEditView->>State: handleUnlimitedBudgetChange(checked=false)
State->>State: setUnlimitedBudget(false)
State->>UserEditView: Update UI
UserEditView-->>User: Enable budget input
end
Note over User,SubmitHandler: Form Submission
User->>Form: Click "Save Changes"
Form->>Form: Validate fields
alt unlimitedBudget is checked
Form->>Form: Skip budget validation
Form->>SubmitHandler: handleSubmit(values)
SubmitHandler->>SubmitHandler: Set values.max_budget = null
else Budget value is empty/null/undefined
Form->>Form: Validation fails
Form-->>User: Show error: "Please enter a budget or select Unlimited Budget"
else Budget has numeric value
Form->>Form: Validation passes
Form->>SubmitHandler: handleSubmit(values)
SubmitHandler->>SubmitHandler: Keep numeric max_budget value
end
SubmitHandler->>SubmitHandler: Parse metadata JSON if needed
SubmitHandler->>UserEditView: onSubmit(values)
UserEditView-->>User: Form submitted
fzowl
pushed a commit
to fzowl/litellm
that referenced
this pull request
Jun 24, 2026
…hange [Feature] UI - User Budget Page: Unlimited Budget Checkbox
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.
Relevant issues
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/directory, Adding at least 1 test is a hard requirement - see detailsmake test-unitCI (LiteLLM team)
Branch creation CI run
Link:
CI run for the last commit
Link:
Merge / cherry-pick CI run
Links:
Type
🆕 New Feature
✅ Test
Changes
Adds an "Unlimited Budget" checkbox to the user edit form that allows setting
max_budgetto null. When checked, the budget input is disabled and the form submitsmax_budgetas null. When unchecked, the budget input is enabled and validation requires a budget value. Adds test coverage for the user edit view component including unlimited budget functionality, form validation, and field visibility based on bulk edit mode.Screenshots