diff --git a/ui/litellm-dashboard/src/components/create_key_button.tsx b/ui/litellm-dashboard/src/components/create_key_button.tsx index 30fcc8432..17476232c 100644 --- a/ui/litellm-dashboard/src/components/create_key_button.tsx +++ b/ui/litellm-dashboard/src/components/create_key_button.tsx @@ -91,16 +91,17 @@ const CreateKey: React.FC = ({ } }; - const sendSlackAlert = async () => { - try { - console.log("Sending Slack alert..."); - const response = await slackBudgetAlertsHealthCheck(accessToken); - console.log("slackBudgetAlertsHealthCheck Response:", response); - console.log("Testing Slack alert successful"); - } catch (error) { - console.error("Error sending Slack alert:", error); + + const handleModelSelection = (selectedModels: string[]) => { + if (selectedModels.includes("all_models")) { + // Select all models except "All Models" + const allModelsExceptAll = team ? team.models : userModels; + form.setFieldsValue({ + models: allModelsExceptAll + }); } }; + const handleCopy = () => { @@ -153,8 +154,11 @@ const CreateKey: React.FC = ({ mode="multiple" placeholder="Select models" style={{ width: "100%" }} + onChange={(selectedModels) => handleModelSelection(selectedModels)} > - + {team && team.models ? ( team.models.map((model: string) => (