diff --git a/frontend/src/i18n/locales/en/aiops.ts b/frontend/src/i18n/locales/en/aiops.ts index 67e7ebf..15182e7 100644 --- a/frontend/src/i18n/locales/en/aiops.ts +++ b/frontend/src/i18n/locales/en/aiops.ts @@ -58,6 +58,7 @@ export default { }, config: { + customModel: 'Custom model…', advanced: 'Advanced', providerSelectHint: 'Pick a provider to autofill endpoint and model', enabled: 'Enable AI analysis', diff --git a/frontend/src/i18n/locales/zh/aiops.ts b/frontend/src/i18n/locales/zh/aiops.ts index b8b5879..120e521 100644 --- a/frontend/src/i18n/locales/zh/aiops.ts +++ b/frontend/src/i18n/locales/zh/aiops.ts @@ -58,6 +58,7 @@ export default { }, config: { + customModel: '自定义模型…', advanced: '高级设置', providerSelectHint: '选择供应商自动填入端点与推荐模型', enabled: '启用 AI 分析', diff --git a/frontend/src/pages/aiops/index.tsx b/frontend/src/pages/aiops/index.tsx index 2013fe7..da1e950 100644 --- a/frontend/src/pages/aiops/index.tsx +++ b/frontend/src/pages/aiops/index.tsx @@ -106,7 +106,14 @@ export default function AiopsPage() { aiApi .getConfig() .then((res: AIConfigResponse) => { - setConfig(res.config) + const cfg = res.config + // 首次配置默认 DeepSeek + 最新 flash:用户只需填 API Key + if (cfg && !cfg.baseUrl && !cfg.model) { + const deepseek = LLM_PROVIDERS.find(p => p.id === 'deepseek')! + cfg.baseUrl = deepseek.endpoint + cfg.model = 'deepseek-flash' + } + setConfig(cfg) setEnabled(Boolean(res.config?.enabled)) setRedactText((res.config?.redactExtra ?? []).join('\n')) setUsedToday(res.tokenUsedToday ?? 0) @@ -540,17 +547,25 @@ export default function AiopsPage() {
{t('config.modelHint')}