[Feature] UI - Default Team Settings: Migrate Default Team Settings to use Reusable Model Select#20310
Merged
yuneng-jiang merged 1 commit intomainfrom Feb 3, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile OverviewGreptile SummaryThis PR refactors the Default Team Settings to use the reusable ModelSelect component and consolidates test coverage. The changes successfully eliminate code duplication while improving maintainability. Key changes:
Clean-up opportunities:
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/components/ModelSelect/ModelSelect.tsx | Added global context support and style prop for flexibility |
| ui/litellm-dashboard/src/components/ModelSelect/ModelSelect.test.tsx | Consolidated redundant tests into parameterized tests with helper factory function |
| ui/litellm-dashboard/src/components/TeamSSOSettings.tsx | Replaced custom model dropdown with reusable ModelSelect component, removed unused availableModels state |
| ui/litellm-dashboard/src/components/TeamSSOSettings.test.tsx | Added comprehensive test coverage for TeamSSOSettings component functionality |
Sequence Diagram
sequenceDiagram
participant User
participant TeamSSOSettings
participant ModelSelect
participant useAllProxyModels
participant API
User->>TeamSSOSettings: Opens Default Team Settings
TeamSSOSettings->>API: getDefaultTeamSettings(accessToken)
API-->>TeamSSOSettings: Returns settings & schema
User->>TeamSSOSettings: Clicks "Edit Settings"
TeamSSOSettings->>TeamSSOSettings: setIsEditing(true)
TeamSSOSettings->>ModelSelect: Renders with context="global"
ModelSelect->>useAllProxyModels: Fetch proxy models
useAllProxyModels->>API: GET /models
API-->>useAllProxyModels: Returns proxy models
useAllProxyModels-->>ModelSelect: Returns filtered models
ModelSelect->>ModelSelect: Filters models by context
ModelSelect->>ModelSelect: Splits wildcard/regular models
ModelSelect-->>TeamSSOSettings: Displays model options
User->>ModelSelect: Selects models
ModelSelect->>TeamSSOSettings: onChange(selectedModels)
TeamSSOSettings->>TeamSSOSettings: handleTextInputChange("models", value)
User->>TeamSSOSettings: Clicks "Save Changes"
TeamSSOSettings->>API: updateDefaultTeamSettings(accessToken, editedValues)
API-->>TeamSSOSettings: Returns updated settings
TeamSSOSettings->>TeamSSOSettings: Updates state & exits edit mode
TeamSSOSettings->>User: Shows success notification
Contributor
Additional Comments (2)
Prompt To Fix With AIThis is a comment left during a code review.
Path: ui/litellm-dashboard/src/components/TeamSSOSettings.tsx
Line: 22:22
Comment:
`availableModels` state is no longer used after migration to ModelSelect component
```suggestion
```
How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix With AIThis is a comment left during a code review.
Path: ui/litellm-dashboard/src/components/TeamSSOSettings.tsx
Line: 38:49
Comment:
Model fetching logic is no longer needed since ModelSelect handles its own data
```suggestion
```
How can I resolve this? If you propose a fix, please make it concise. |
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
🧹 Refactoring
✅ Test
Changes
Replaces the custom model selection implementation in TeamSSOSettings with the reusable ModelSelect component. Refactors ModelSelect tests to consolidate similar test cases and improve maintainability. Adds comprehensive test coverage for TeamSSOSettings component.
Screenshots