fix(ai_router): DIAGNOSE/ALERT_TRIAGE 改用 llama3.2:3b 避免 90秒 timeout
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 7m5s
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 7m5s
qwen2.5:7b-instruct 在 prod 需要 >90s,導致 DIAGNOSE intent 全鏈路失敗。 llama3.2:3b (summary model) 實測 4s 回應,適合 triage 類快速判斷。 規則 3 新增特判: DIAGNOSE/ALERT_TRIAGE/QUERY → ollama summary model 不影響其他 intent 的 model 選擇邏輯。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -398,7 +398,14 @@ class AIRouter:
|
||||
provider_override = self._intent_provider_overrides.get(intent)
|
||||
if provider_override is not None:
|
||||
provider = provider_override
|
||||
model = self._provider_models[provider]
|
||||
# 2026-04-03 ogt: DIAGNOSE/ALERT_TRIAGE 用 summary model (llama3.2:3b)
|
||||
# 避免 qwen2.5:7b-instruct 90秒 timeout 導致全鏈路失敗 (Phase 24 A選項)
|
||||
if provider == AIProviderEnum.OLLAMA and intent in (
|
||||
IntentType.DIAGNOSE, IntentType.ALERT_TRIAGE, IntentType.QUERY
|
||||
):
|
||||
model = self._ollama_summary
|
||||
else:
|
||||
model = self._provider_models[provider]
|
||||
reason = f"意圖 {intent.value} 指定使用 {provider.value}"
|
||||
return provider, model, reason
|
||||
|
||||
|
||||
Reference in New Issue
Block a user