Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

feat(ui): note in the add-member modal that search covers existing users only

Yuneng Jiang48b3d1889395
diff --git a/ui/litellm-dashboard/src/components/common_components/user_search_modal.test.tsx b/ui/litellm-dashboard/src/components/common_components/user_search_modal.test.tsx
index 72b0e10e5d6..634c78d28d0 100644
--- a/ui/litellm-dashboard/src/components/common_components/user_search_modal.test.tsx
+++ b/ui/litellm-dashboard/src/components/common_components/user_search_modal.test.tsx
@@ -65,4 +65,14 @@ describe("UserSearchModal", () => {
expect(userFilterUICall).not.toHaveBeenCalled();
});
+
+ it("tells the user that only existing accounts can be selected", () => {
+ renderModal();
+
+ const notice = screen.getByRole("alert");
+ expect(notice).toHaveTextContent(/users that already exist/i);
+ expect(notice).toHaveTextContent(/ask a proxy admin to create their account first/i);
+ // info, not warning: a warning here would read as an error state on an empty form
+ expect(notice.className).toMatch(/ant-alert-info/);
+ });
});
diff --git a/ui/litellm-dashboard/src/components/common_components/user_search_modal.tsx b/ui/litellm-dashboard/src/components/common_components/user_search_modal.tsx
index fafafd8e5d5..9c1d64a1f86 100644
--- a/ui/litellm-dashboard/src/components/common_components/user_search_modal.tsx
+++ b/ui/litellm-dashboard/src/components/common_components/user_search_modal.tsx
@@ -1,5 +1,5 @@
import { useState } from "react";
-import { Modal, Form, Button, Select, Tooltip } from "antd";
+import { Modal, Form, Button, Select, Tooltip, Alert } from "antd";
import { UserAddOutlined } from "@ant-design/icons";
import { useDebouncedCallback } from "@tanstack/react-pacer/debouncer";
import { userFilterUICall } from "@/components/networking";
@@ -140,6 +140,14 @@ const UserSearchModal: React.FC<UserSearchModalProps> = ({
role: defaultRole,
}}
>
+ <Alert
+ type="info"
+ showIcon
+ className="mb-4"
+ message="Search selects from users that already exist. To add someone new, ask a proxy admin to create their account first."
+ data-testid="member-existing-users-notice"
+ />
+
<Form.Item label="Email" name="user_email" className="mb-4">
<Select
showSearch