From 32b498358e6a9ba2ac6fc9f01ddcb38fad87ebb8 Mon Sep 17 00:00:00 2001 From: panyehong <2655992392@qq.com> Date: Wed, 5 Nov 2025 16:49:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20Fix=20the=20issue=20where=20?= =?UTF-8?q?the=20frontend=20still=20throws=20an=20exception=20after=20succ?= =?UTF-8?q?essfully=20batch=20modifying=20the=20model=20configuration=20#1?= =?UTF-8?q?439?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../setup/models/components/model/ModelDeleteDialog.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/frontend/app/[locale]/setup/models/components/model/ModelDeleteDialog.tsx b/frontend/app/[locale]/setup/models/components/model/ModelDeleteDialog.tsx index aa8798785..652997759 100644 --- a/frontend/app/[locale]/setup/models/components/model/ModelDeleteDialog.tsx +++ b/frontend/app/[locale]/setup/models/components/model/ModelDeleteDialog.tsx @@ -453,15 +453,12 @@ export const ModelDeleteDialog = ({ maxTokens: maxTokens || m.maxTokens, })); - const result = await modelService.updateBatchModel( + await modelService.updateBatchModel( currentModelPayloads ); - if (result.code !== 200) { - message.error(t("model.dialog.error.noModelsFetched")); - } else { - message.success(t("model.dialog.success.updateSuccess")); - } + // Show success message since no exception was thrown + message.success(t("model.dialog.success.updateSuccess")); // Optionally use currentModelPayloads for subsequent API calls if needed } catch (e) { From 03c7e5745df915e96ba129621281d5c023047235 Mon Sep 17 00:00:00 2001 From: panyehong <2655992392@qq.com> Date: Wed, 5 Nov 2025 17:21:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=90=9B=20Fix=20the=20issue=20where=20?= =?UTF-8?q?the=20frontend=20still=20throws=20an=20exception=20after=20succ?= =?UTF-8?q?essfully=20batch=20modifying=20the=20model=20configuration=20#1?= =?UTF-8?q?439=20comments=20revision?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/public/locales/en/common.json | 2 +- frontend/public/locales/zh/common.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/public/locales/en/common.json b/frontend/public/locales/en/common.json index 6c9c73a1c..d954043db 100644 --- a/frontend/public/locales/en/common.json +++ b/frontend/public/locales/en/common.json @@ -562,7 +562,7 @@ "model.dialog.error.connectivityRequired": "Please verify model connectivity and ensure connection is successful before adding the model", "model.dialog.error.addFailed": "Failed to add model", "model.dialog.error.addFailedLog": "Failed to add model", - "model.dialog.error.noModelsFetched": "Please check your API key and network connectivity", + "model.dialog.error.noModelsFetched": "Operation failed! Please check your API key and network connectivity", "model.dialog.message.noModels": "Please fetch models first", "model.dialog.success.updateSuccess": "Updated successfully", "model.dialog.editTitle": "Edit Model", diff --git a/frontend/public/locales/zh/common.json b/frontend/public/locales/zh/common.json index 087372de1..22d04eacb 100644 --- a/frontend/public/locales/zh/common.json +++ b/frontend/public/locales/zh/common.json @@ -562,7 +562,7 @@ "model.dialog.error.connectivityRequired": "请先验证模型连通性且确保连接成功后再添加模型", "model.dialog.error.addFailed": "添加模型失败", "model.dialog.error.addFailedLog": "添加模型失败", - "model.dialog.error.noModelsFetched": "请检查相关API Key以及网络连通性", + "model.dialog.error.noModelsFetched": "操作失败!请检查相关API Key以及网络连通性", "model.dialog.message.noModels": "请先获取模型", "model.dialog.editTitle": "编辑模型", "model.dialog.editSuccess": "模型更新成功",