fix(admin): LLM 路由标签动态化
- 默认提供商按 id 排序取第一个活跃的(nvidia step-3.7-flash) - 合规审查取活跃且 model=deepseek-v4-flash 的(sensenova) - 不再硬编码
This commit is contained in:
@@ -111,7 +111,7 @@
|
|||||||
<el-tag type="success" size="small" effect="dark">{{ defaultProvider }} ({{ defaultModel }})</el-tag>
|
<el-tag type="success" size="small" effect="dark">{{ defaultProvider }} ({{ defaultModel }})</el-tag>
|
||||||
<span style="color:#999">← 默认(趋势/采集/创作/优化)</span>
|
<span style="color:#999">← 默认(趋势/采集/创作/优化)</span>
|
||||||
<span style="margin:0 4px;color:#ccc">|</span>
|
<span style="margin:0 4px;color:#ccc">|</span>
|
||||||
<el-tag type="warning" size="small" effect="dark">sensenova (deepseek-v4-flash)</el-tag>
|
<el-tag type="warning" size="small" effect="dark">{{ complianceProvider }} ({{ complianceModel }})</el-tag>
|
||||||
<span style="color:#999">← 合规审查固定</span>
|
<span style="color:#999">← 合规审查固定</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
@@ -1101,15 +1101,23 @@ const llmConfigs = ref([]);
|
|||||||
});
|
});
|
||||||
|
|
||||||
const defaultProvider = computed(() => {
|
const defaultProvider = computed(() => {
|
||||||
const active = llmConfigs.value.filter(x => x.is_active);
|
const sorted = [...llmConfigs.value].filter(x => x.is_active).sort((a, b) => a.id - b.id);
|
||||||
return active.length ? active[0].provider : '-';
|
return sorted.length ? sorted[0].provider : '-';
|
||||||
});
|
});
|
||||||
const defaultModel = computed(() => {
|
const defaultModel = computed(() => {
|
||||||
const active = llmConfigs.value.filter(x => x.is_active);
|
const sorted = [...llmConfigs.value].filter(x => x.is_active).sort((a, b) => a.id - b.id);
|
||||||
return active.length ? active[0].model : '-';
|
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 {
|
return {
|
||||||
defaultProvider, defaultModel,
|
defaultProvider, defaultModel, complianceProvider, complianceModel,
|
||||||
activeTab, switchTab,
|
activeTab, switchTab,
|
||||||
llmConfigs, llmConfigsLoading, llmConfigDialogVisible, llmConfigForm, llmConfigDialogTitle, showLLMConfigDialog, saveLLMConfig, deleteLLMConfig,
|
llmConfigs, llmConfigsLoading, llmConfigDialogVisible, llmConfigForm, llmConfigDialogTitle, showLLMConfigDialog, saveLLMConfig, deleteLLMConfig,
|
||||||
platformConfigs, platformConfigsLoading, platformConfigsRequested, pcShowActiveOnly, showPcDialog, pcForm, pcDialogTitle, showPcDialogFn, savePcForm, editingPcPlatform,
|
platformConfigs, platformConfigsLoading, platformConfigsRequested, pcShowActiveOnly, showPcDialog, pcForm, pcDialogTitle, showPcDialogFn, savePcForm, editingPcPlatform,
|
||||||
|
|||||||
Reference in New Issue
Block a user