fix(web): custom model not support api key edit

This commit is contained in:
zhaoying
2026-04-21 15:04:35 +08:00
parent 83b7c6870d
commit 7eb21f677f

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing * @Author: ZhaoYing
* @Date: 2026-02-03 16:49:28 * @Date: 2026-02-03 16:49:28
* @Last Modified by: ZhaoYing * @Last Modified by: ZhaoYing
* @Last Modified time: 2026-04-16 18:03:53 * @Last Modified time: 2026-04-21 15:02:53
*/ */
/** /**
* Custom Model Modal * Custom Model Modal
@@ -230,6 +230,7 @@ const CustomModelModal = forwardRef<CustomModelModalRef, CustomModelModalProps>(
<Input.TextArea placeholder={t('common.pleaseEnter')} /> <Input.TextArea placeholder={t('common.pleaseEnter')} />
</Form.Item> </Form.Item>
{!isEdit && <>
<Form.Item <Form.Item
name={["api_keys", 0, "api_key"]} name={["api_keys", 0, "api_key"]}
label={t('modelNew.api_key')} label={t('modelNew.api_key')}
@@ -245,6 +246,7 @@ const CustomModelModal = forwardRef<CustomModelModalRef, CustomModelModalProps>(
> >
<Input placeholder="https://api.example.com/v1" /> <Input placeholder="https://api.example.com/v1" />
</Form.Item> </Form.Item>
</>}
{['llm', 'chat'].includes(modelType as string) && {['llm', 'chat'].includes(modelType as string) &&
<Row gutter={16}> <Row gutter={16}>