From abbf1468bc8fba25583491d68c8159f190309d42 Mon Sep 17 00:00:00 2001 From: Yuzhiran Dev Date: Mon, 1 Jun 2026 14:46:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(admin):=20LLM=20=E8=B7=AF=E7=94=B1=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=8A=A8=E6=80=81=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 默认提供商按 id 排序取第一个活跃的(nvidia step-3.7-flash) - 合规审查取活跃且 model=deepseek-v4-flash 的(sensenova) - 不再硬编码 --- platform/frontend/admin.html | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/platform/frontend/admin.html b/platform/frontend/admin.html index 8a0430c..6b470c5 100644 --- a/platform/frontend/admin.html +++ b/platform/frontend/admin.html @@ -111,7 +111,7 @@ {{ defaultProvider }} ({{ defaultModel }}) ← 默认(趋势/采集/创作/优化) | - sensenova (deepseek-v4-flash) + {{ complianceProvider }} ({{ complianceModel }}) ← 合规审查固定
@@ -1101,15 +1101,23 @@ const llmConfigs = ref([]); }); const defaultProvider = computed(() => { - const active = llmConfigs.value.filter(x => x.is_active); - return active.length ? active[0].provider : '-'; + const sorted = [...llmConfigs.value].filter(x => x.is_active).sort((a, b) => a.id - b.id); + return sorted.length ? sorted[0].provider : '-'; }); const defaultModel = computed(() => { - const active = llmConfigs.value.filter(x => x.is_active); - return active.length ? active[0].model : '-'; + const sorted = [...llmConfigs.value].filter(x => x.is_active).sort((a, b) => a.id - b.id); + return sorted.length ? sorted[0].model : '-'; + }); + const complianceProvider = computed(() => { + const c = [...llmConfigs.value].filter(x => x.is_active && x.model === 'deepseek-v4-flash'); + return c.length ? c[0].provider : '-'; + }); + const complianceModel = computed(() => { + const c = [...llmConfigs.value].filter(x => x.is_active && x.model === 'deepseek-v4-flash'); + return c.length ? c[0].model : '-'; }); return { - defaultProvider, defaultModel, + defaultProvider, defaultModel, complianceProvider, complianceModel, activeTab, switchTab, llmConfigs, llmConfigsLoading, llmConfigDialogVisible, llmConfigForm, llmConfigDialogTitle, showLLMConfigDialog, saveLLMConfig, deleteLLMConfig, platformConfigs, platformConfigsLoading, platformConfigsRequested, pcShowActiveOnly, showPcDialog, pcForm, pcDialogTitle, showPcDialogFn, savePcForm, editingPcPlatform,