From 6d8ece58025eb7f93c606279c97e64326f299cd6 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 5 Mar 2026 01:15:41 +0000 Subject: [PATCH] feat: make model selection optional when creating virtual keys - Remove required validation for models field in create_key_button.tsx - Update help text to clarify models are optional - If no models selected, key will have access to all models - This allows users to create keys for MCP-only access without selecting LLM models - Fixes LIT-1791: Cannot create virtual key without LLM provider if user only has MCP access Backend already supports empty models list (defaults to all models). This change only updates the UI source to match backend behavior. Co-authored-by: Ishaan Jaff --- .../src/components/organisms/create_key_button.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx b/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx index 19a07c49a3d..c54725bd5a5 100644 --- a/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx +++ b/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx @@ -772,21 +772,17 @@ const CreateKey: React.FC = ({ team, teams, data, addKey }) => { label={ Models{" "} - + } name="models" - rules={ - keyType === "management" || keyType === "read_only" - ? [] - : [{ required: true, message: "Please select a model" }] - } + rules={[]} help={ keyType === "management" || keyType === "read_only" ? "Models field is disabled for this key type" - : "required" + : "optional - leave empty to allow access to all models" } className="mt-4" >