fix(api): 增加 LLM 超時到 120/180s (llama3.2:3b CPU 約 2-3 分鐘)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-27 09:23:35 +08:00
parent a3a02398c3
commit d1409fc4c0

View File

@@ -148,8 +148,8 @@ async def list_incidents() -> IncidentListResponse:
for incident in incidents:
try:
# P0/P1 給更短的 timeout (緊急)
# 2026-03-27 ogt: 增加超時 (Ollama CPU 模式較慢)
timeout = 30.0 if incident.severity in (Severity.P0, Severity.P1) else 60.0
# 2026-03-27 ogt: 增加超時 (Ollama CPU 模式 llama3.2:3b 約 2-3 分鐘)
timeout = 120.0 if incident.severity in (Severity.P0, Severity.P1) else 180.0
decision_token = await decision_manager.get_or_create_decision(
incident=incident,