test(ai-router): 更新 DIAGNOSE routing 測試 — None → OPENCLAW_NEMO
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 14m52s
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 14m52s
test_diagnose_override_is_none → test_diagnose_override_is_openclaw_nemo 配合 ai_router.py DIAGNOSE 路由修復(Ollama 238s timeout 根因修復) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -142,18 +142,19 @@ class TestLocalFallbackChain:
|
||||
class TestDiagnoseIntentOverride:
|
||||
"""DIAGNOSE intent 路由設定驗證"""
|
||||
|
||||
def test_diagnose_override_is_none(self):
|
||||
"""_intent_provider_overrides[DIAGNOSE] 應為 None(複雜度路由)
|
||||
def test_diagnose_override_is_openclaw_nemo(self):
|
||||
"""_intent_provider_overrides[DIAGNOSE] 應為 OPENCLAW_NEMO
|
||||
|
||||
2026-04-12 ogt: NEMOTRON routing 暫停 — NIM tool_call 無 confidence 欄位
|
||||
導致 confidence=0.0,待 NemotronProvider._parse_confidence() 修復後恢復。
|
||||
目前 DIAGNOSE 走複雜度路由(Gemini/openclaw_nemo 處理)。
|
||||
2026-04-16 ogt: 恢復 DIAGNOSE → OPENCLAW_NEMO — None 複雜度路由落入 Rule 6
|
||||
→ Ollama deepseek-r1:14b CPU 需 238s → timeout → degraded → 全部「待分析」
|
||||
OPENCLAW_NEMO = 188:8088 NVIDIA NIM,實測 2-27s,JSON 輸出可靠
|
||||
"""
|
||||
from src.services.ai_router import AIRouter
|
||||
from src.services.ai_router import AIRouter, AIProviderEnum
|
||||
from src.services.intent_classifier import IntentType
|
||||
|
||||
router = AIRouter()
|
||||
override = router._intent_provider_overrides.get(IntentType.DIAGNOSE)
|
||||
assert override is None, (
|
||||
f"DIAGNOSE 應為 None(複雜度路由),實際為 {override}"
|
||||
assert override is AIProviderEnum.OPENCLAW_NEMO, (
|
||||
f"DIAGNOSE 應為 OPENCLAW_NEMO,實際為 {override}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user