diff --git a/ui/litellm-dashboard/src/components/create_key_button.tsx b/ui/litellm-dashboard/src/components/create_key_button.tsx index 99cbd7b6e6..bd4fddabb3 100644 --- a/ui/litellm-dashboard/src/components/create_key_button.tsx +++ b/ui/litellm-dashboard/src/components/create_key_button.tsx @@ -142,20 +142,32 @@ const CreateKey: React.FC = ({ placeholder="Select models" style={{ width: "100%" }} > - {team && team.models ? ( - team.models.map((model: string) => ( - - )) - ) : ( - userModels.map((model: string) => ( - - )) - )} - + + {team && team.models ? ( + team.models.includes("all-proxy-models") ? ( + userModels.map((model: string) => ( + ( + + ) + )) + ) : ( + team.models.map((model: string) => ( + + )) + ) + ) : ( + userModels.map((model: string) => ( + + )) + )} diff --git a/ui/litellm-dashboard/src/components/teams.tsx b/ui/litellm-dashboard/src/components/teams.tsx index e90203764b..80172b8a02 100644 --- a/ui/litellm-dashboard/src/components/teams.tsx +++ b/ui/litellm-dashboard/src/components/teams.tsx @@ -116,16 +116,13 @@ const Team: React.FC = ({ - All Models on Proxy + All Proxy Models - - All Models on Proxy - {userModels && userModels.map((model) => ( {model} @@ -359,23 +356,30 @@ const handleEditSubmit = async (formValues: Record) => { {team["max_budget"] ? team["max_budget"] : "No limit"} - - {Array.isArray(team.models) ? ( -
- {team.models.length === 0 ? ( - - all-proxy-models - - ) : ( - team.models.map((model: string, index: number) => ( + + {Array.isArray(team.models) ? ( +
+ {team.models.length === 0 ? ( + + All Proxy Models + + ) : ( + team.models.map((model: string, index: number) => ( + model === "all-proxy-models" ? ( + + All Proxy Models + + ) : ( {model.length > 30 ? `${model.slice(0, 30)}...` : model} - )) - )} -
- ) : null} + ) + )) + )} +
+ ) : null}
+ TPM:{" "} @@ -484,7 +488,7 @@ const handleEditSubmit = async (formValues: Record) => { style={{ width: "100%" }} > - All Models on Proxy + All Proxy Models {userModels.map((model) => ( diff --git a/ui/litellm-dashboard/src/components/view_key_table.tsx b/ui/litellm-dashboard/src/components/view_key_table.tsx index ffb61dfff6..f500def6a4 100644 --- a/ui/litellm-dashboard/src/components/view_key_table.tsx +++ b/ui/litellm-dashboard/src/components/view_key_table.tsx @@ -147,7 +147,10 @@ const ViewKeyTable: React.FC = ({ mode="multiple" placeholder="Select models" style={{ width: "100%" }} - > + > + {selectedTeam && selectedTeam.models ? ( selectedTeam.models.map((model: string) => ( */} - - {Array.isArray(item.models) ? ( -
- {item.models.length === 0 ? ( - <> - {selectedTeam && selectedTeam.models && selectedTeam.models.length > 0 ? ( - selectedTeam.models.map((model: string, index: number) => ( - - {model.length > 30 ? `${model.slice(0, 30)}...` : model} - - )) - ) : ( - // If selected team is None or selected team's models are empty, show all models - - all-proxy-models - - )} - - ) : ( - item.models.map((model: string, index: number) => ( - - {model.length > 30 ? `${model.slice(0, 30)}...` : model} - - )) - )} -
- ) : null} -
+ + {Array.isArray(item.models) ? ( +
+ {item.models.length === 0 ? ( + <> + {selectedTeam && selectedTeam.models && selectedTeam.models.length > 0 ? ( + selectedTeam.models.map((model: string, index: number) => ( + model === "all-proxy-models" ? ( + + All Proxy Models + + ) : model === "all-team-models" ? ( + + All Team Models + + ) : ( + + {model.length > 30 ? `${model.slice(0, 30)}...` : model} + + ) + )) + ) : ( + // If selected team is None or selected team's models are empty, show all models + + all-proxy-models + + )} + + ) : ( + item.models.map((model: string, index: number) => ( + model === "all-proxy-models" ? ( + + All Proxy Models + + ) : model === "all-team-models" ? ( + + All Team Models + + ) : ( + + {model.length > 30 ? `${model.slice(0, 30)}...` : model} + + ) + )) + )} +
+ ) : null} +