From 3ce67bacad8d21327f07a4838da1441b2138959d Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Wed, 15 Apr 2026 12:16:33 -0700 Subject: [PATCH 1/5] [Feature] UI - Users: add Send Invitation Email toggle to Invite User modal The Invite User flow was calling /user/new without send_invite_email, so the backend invitation-email hook (gated on send_invite_email is True) was silently skipped. Add a checkbox, default on, so admins can opt out when needed. --- .../src/components/CreateUserButton.tsx | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/ui/litellm-dashboard/src/components/CreateUserButton.tsx b/ui/litellm-dashboard/src/components/CreateUserButton.tsx index b65caec26d0..7d2fc101508 100644 --- a/ui/litellm-dashboard/src/components/CreateUserButton.tsx +++ b/ui/litellm-dashboard/src/components/CreateUserButton.tsx @@ -2,7 +2,7 @@ import { InfoCircleOutlined, UserAddOutlined } from "@ant-design/icons"; import { useQueryClient } from "@tanstack/react-query"; import { useOrganizations } from "@/app/(dashboard)/hooks/organizations/useOrganizations"; import { Accordion, AccordionBody, AccordionHeader, SelectItem, TextInput } from "@tremor/react"; -import { Alert, Button, Form, Input, Modal, Select, Select as Select2, Space, Tooltip, Typography } from "antd"; +import { Alert, Button, Checkbox, Form, Input, Modal, Select, Select as Select2, Space, Tooltip, Typography } from "antd"; import React, { useEffect, useMemo, useState } from "react"; import BulkCreateUsers from "./bulk_create_users_button"; import TeamDropdown from "./common_components/team_dropdown"; @@ -113,6 +113,7 @@ export const CreateUserButton: React.FC = ({ user_role: string; organization_ids?: string[]; organizations?: string[]; + send_invite_email?: boolean; }) => { try { NotificationsManager.info("Making API Call"); @@ -181,7 +182,7 @@ export const CreateUserButton: React.FC = ({ labelCol={{ span: 8 }} wrapperCol={{ span: 16 }} labelAlign="left" - initialValues={{ user_role: "internal_user_viewer" }} + initialValues={{ user_role: "internal_user_viewer", send_invite_email: true }} > = ({ + + Send invitation email + +
@@ -270,7 +279,7 @@ export const CreateUserButton: React.FC = ({ labelCol={{ span: 8 }} wrapperCol={{ span: 16 }} labelAlign="left" - initialValues={{ user_role: "internal_user_viewer" }} + initialValues={{ user_role: "internal_user_viewer", send_invite_email: true }} > @@ -360,6 +369,15 @@ export const CreateUserButton: React.FC = ({ + + + Send invitation email + +
@@ -370,15 +376,21 @@ export const CreateUserButton: React.FC = ({ - - Send invitation email - - -
+ + Send invitation email + From 55829c225423f0432ac54adaeb8c4c7ef3b278b3 Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Wed, 15 Apr 2026 12:28:41 -0700 Subject: [PATCH 3/5] Render Send Invitation Email as a labeled form item to align with other fields --- .../src/components/CreateUserButton.tsx | 44 +++++++------------ 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/ui/litellm-dashboard/src/components/CreateUserButton.tsx b/ui/litellm-dashboard/src/components/CreateUserButton.tsx index 5a3c035bd6a..ed5b8f8f8fd 100644 --- a/ui/litellm-dashboard/src/components/CreateUserButton.tsx +++ b/ui/litellm-dashboard/src/components/CreateUserButton.tsx @@ -225,21 +225,15 @@ export const CreateUserButton: React.FC = ({ -
- - Send invitation email - + + + +
@@ -376,21 +370,15 @@ export const CreateUserButton: React.FC = ({ -
- - Send invitation email - + + + +
From a7c947f9dd577d60105e1b4e6d83d916e396063a Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Wed, 15 Apr 2026 12:31:23 -0700 Subject: [PATCH 4/5] Move Send Invitation Email field directly below User Email in both forms --- .../src/components/CreateUserButton.tsx | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/ui/litellm-dashboard/src/components/CreateUserButton.tsx b/ui/litellm-dashboard/src/components/CreateUserButton.tsx index ed5b8f8f8fd..cdfe9fa36e3 100644 --- a/ui/litellm-dashboard/src/components/CreateUserButton.tsx +++ b/ui/litellm-dashboard/src/components/CreateUserButton.tsx @@ -202,6 +202,13 @@ export const CreateUserButton: React.FC = ({ + + + {possibleUIRoles && @@ -225,14 +232,6 @@ export const CreateUserButton: React.FC = ({ - - - -
@@ -284,6 +283,13 @@ export const CreateUserButton: React.FC = ({ + + + @@ -370,14 +376,6 @@ export const CreateUserButton: React.FC = ({ - - - -
@@ -283,13 +284,6 @@ export const CreateUserButton: React.FC = ({ - - - @@ -341,6 +335,13 @@ export const CreateUserButton: React.FC = ({ + + + Personal Key Creation