mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix(ui): Change default key type from 'Default' to 'LLM API' for improved security (#19516)
- Changed initial keyType state to 'llm_api' instead of 'default' - Updated reset functions (handleOk, handleCancel) to use 'llm_api' - Updated form initialValue and Select defaultValue to 'llm_api' Addresses #19492
This commit is contained in:
parent
7ffc1a718a
commit
ac0ab214fb
1 changed files with 5 additions and 5 deletions
|
|
@ -159,7 +159,7 @@ const CreateKey: React.FC<CreateKeyProps> = ({ team, teams, data, addKey }) => {
|
|||
const [userSearchLoading, setUserSearchLoading] = useState<boolean>(false);
|
||||
const [mcpAccessGroups, setMcpAccessGroups] = useState<string[]>([]);
|
||||
const [disabledCallbacks, setDisabledCallbacks] = useState<string[]>([]);
|
||||
const [keyType, setKeyType] = useState<string>("default");
|
||||
const [keyType, setKeyType] = useState<string>("llm_api");
|
||||
const [modelAliases, setModelAliases] = useState<{ [key: string]: string }>({});
|
||||
const [autoRotationEnabled, setAutoRotationEnabled] = useState<boolean>(false);
|
||||
const [rotationInterval, setRotationInterval] = useState<string>("30d");
|
||||
|
|
@ -168,7 +168,7 @@ const CreateKey: React.FC<CreateKeyProps> = ({ team, teams, data, addKey }) => {
|
|||
form.resetFields();
|
||||
setLoggingSettings([]);
|
||||
setDisabledCallbacks([]);
|
||||
setKeyType("default");
|
||||
setKeyType("llm_api");
|
||||
setModelAliases({});
|
||||
setAutoRotationEnabled(false);
|
||||
setRotationInterval("30d");
|
||||
|
|
@ -181,7 +181,7 @@ const CreateKey: React.FC<CreateKeyProps> = ({ team, teams, data, addKey }) => {
|
|||
form.resetFields();
|
||||
setLoggingSettings([]);
|
||||
setDisabledCallbacks([]);
|
||||
setKeyType("default");
|
||||
setKeyType("llm_api");
|
||||
setModelAliases({});
|
||||
setAutoRotationEnabled(false);
|
||||
setRotationInterval("30d");
|
||||
|
|
@ -676,11 +676,11 @@ const CreateKey: React.FC<CreateKeyProps> = ({ team, teams, data, addKey }) => {
|
|||
</span>
|
||||
}
|
||||
name="key_type"
|
||||
initialValue="default"
|
||||
initialValue="llm_api"
|
||||
className="mt-4"
|
||||
>
|
||||
<Select
|
||||
defaultValue="default"
|
||||
defaultValue="llm_api"
|
||||
placeholder="Select key type"
|
||||
style={{ width: "100%" }}
|
||||
optionLabelProp="label"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue