From a2a98452ad451259abebbefb1bcaabfdc2e95e43 Mon Sep 17 00:00:00 2001 From: OG T Date: Thu, 9 Apr 2026 18:51:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(web):=20=E7=A7=BB=E9=99=A4=20AIModelStatus?= =?UTF-8?q?=20=E5=81=87=E7=B6=A0=E7=87=88=20=E2=80=94=20Gemini/NVIDIA=20?= =?UTF-8?q?=E4=B8=8D=E6=87=89=20assumed=20up?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: /api/v1/health 的 components 只有 api/database/redis/ollama/openclaw d.components.gemini 永遠 undefined → healthy: true 是硬編碼假數據 修復: 改為只有 components 有對應 key 才更新狀態 無 health 資料時保持 false(unknown),不顯示假綠燈 Co-Authored-By: Claude Sonnet 4.6 --- apps/web/src/components/shared/ai-model-status.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/shared/ai-model-status.tsx b/apps/web/src/components/shared/ai-model-status.tsx index 31983a9a..20df7047 100644 --- a/apps/web/src/components/shared/ai-model-status.tsx +++ b/apps/web/src/components/shared/ai-model-status.tsx @@ -34,8 +34,10 @@ export function AIModelStatus() { setModels(prev => prev.map(m => { if (m.name.includes('OpenClaw') && d.components.openclaw) return { ...m, healthy: d.components.openclaw.status === 'up' } if (m.name.includes('Ollama') && d.components.ollama) return { ...m, healthy: d.components.ollama.status === 'up' } - if (m.name.includes('Gemini')) return { ...m, healthy: true } // cloud assumed up - if (m.name.includes('NVIDIA')) return { ...m, healthy: true } + // 2026-04-09 Claude Sonnet 4.6: 移除假數據 — /api/v1/health 無 gemini/nvidia component + // cloud 模型狀態未知,保持 false,不顯示假綠燈 + if (m.name.includes('Gemini') && d.components.gemini) return { ...m, healthy: d.components.gemini.status === 'up' } + if (m.name.includes('NVIDIA') && d.components.nvidia) return { ...m, healthy: d.components.nvidia.status === 'up' } return m })) })