mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
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 <ishaan-jaff@users.noreply.github.com>
This commit is contained in:
parent
b7f43d411a
commit
6d8ece5802
1 changed files with 3 additions and 7 deletions
|
|
@ -772,21 +772,17 @@ const CreateKey: React.FC<CreateKeyProps> = ({ team, teams, data, addKey }) => {
|
|||
label={
|
||||
<span>
|
||||
Models{" "}
|
||||
<Tooltip title="Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team">
|
||||
<Tooltip title="Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.">
|
||||
<InfoCircleOutlined style={{ marginLeft: "4px" }} />
|
||||
</Tooltip>
|
||||
</span>
|
||||
}
|
||||
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"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue