fix(alerts): bypass proxy timeout for GCP Ollama
This commit is contained in:
@@ -70,11 +70,11 @@ def _agent_debate_global_timeout_seconds() -> float:
|
||||
90s guard. Keep a hard ceiling, but make it an explicit deployment knob.
|
||||
"""
|
||||
|
||||
raw = os.environ.get("AGENT_DEBATE_GLOBAL_TIMEOUT_SEC", "260.0")
|
||||
raw = os.environ.get("AGENT_DEBATE_GLOBAL_TIMEOUT_SEC", "420.0")
|
||||
try:
|
||||
timeout = float(raw)
|
||||
except (TypeError, ValueError):
|
||||
timeout = 260.0
|
||||
timeout = 420.0
|
||||
return max(timeout, 90.0)
|
||||
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ class OllamaProvider:
|
||||
options = registry.get_provider_options("ollama")
|
||||
|
||||
# P0 2026-04-04 Claude Code: per-task timeout(Option C 分情境)
|
||||
# FORCE_LOCAL/diagnose → OLLAMA_DIAGNOSE_TIMEOUT_SECONDS (200s,實測 ~173s)
|
||||
# FORCE_LOCAL/diagnose → OLLAMA_DIAGNOSE_TIMEOUT_SECONDS
|
||||
# 其他 → OPENCLAW_TIMEOUT(既有設定)
|
||||
task_type = (context or {}).get("task_type", "")
|
||||
if task_type in ("diagnose", "force_local"):
|
||||
|
||||
@@ -1137,7 +1137,7 @@ class OpenClawService:
|
||||
|
||||
# 2026-04-29 ogt + Claude Code: 注入 task_type 讓 Ollama 用正確 timeout
|
||||
# 根因: ai_providers/ollama.py:77 讀 context["task_type"] 決定 timeout
|
||||
# - "diagnose"/"force_local" → OLLAMA_DIAGNOSE_TIMEOUT_SECONDS=200s
|
||||
# - "diagnose"/"force_local" → OLLAMA_DIAGNOSE_TIMEOUT_SECONDS
|
||||
# - 其他/未注入 → OPENCLAW_TIMEOUT=30s(不夠 qwen2.5:7b 推理)
|
||||
# webhooks alert_context 從未注入 task_type → Ollama fallback 永遠 30s timeout
|
||||
# 對齊 decision.intent 後 Ollama fallback 真正能跑完
|
||||
|
||||
Reference in New Issue
Block a user