From a25d00bacebe1e0f1eb936a552673fb16486d0f2 Mon Sep 17 00:00:00 2001 From: Seefs Date: Wed, 26 Nov 2025 18:12:36 +0800 Subject: [PATCH] fix: edit vertex key type --- .../components/table/channels/modals/EditChannelModal.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/src/components/table/channels/modals/EditChannelModal.jsx b/web/src/components/table/channels/modals/EditChannelModal.jsx index 4b46444dd..b1d2545f2 100644 --- a/web/src/components/table/channels/modals/EditChannelModal.jsx +++ b/web/src/components/table/channels/modals/EditChannelModal.jsx @@ -1188,6 +1188,13 @@ const EditChannelModal = (props) => { settings.aws_key_type = localInputs.aws_key_type || 'ak_sk'; } + // type === 41 (Vertex): 始终保存 vertex_key_type 到 settings,避免编辑时被重置 + if (localInputs.type === 41) { + settings.vertex_key_type = localInputs.vertex_key_type || 'json'; + } else if ('vertex_key_type' in settings) { + delete settings.vertex_key_type; + } + // type === 1 (OpenAI) 或 type === 14 (Claude): 设置字段透传控制(显式保存布尔值) if (localInputs.type === 1 || localInputs.type === 14) { settings.allow_service_tier = localInputs.allow_service_tier === true;