Your Name
2b2359e367
Code Review / ai-code-review (push) Successful in 55s
run-migration / migrate (push) Successful in 41s
fix(ai-router): ADR-110 GCP 三層容災 — 修復 Ollama 直跳 Gemini 根因
根因(所有告警 Ollama 失敗直接跳 Gemini 的原因):
AIProviderEnum 缺少 ollama_gcp_a / ollama_gcp_b / ollama_local
→ AIProviderEnum("ollama_gcp_a") 拋 ValueError
→ fallback chain 清空(所有 GCP 端點轉換全失敗)
→ failover_fallback = [](空 list,非 None)
→ fallback_chain 被覆寫為 [] 而非走 Gemini 備援
→ AIProviderRegistry.get("ollama_gcp_a") 回傳 None → not_registered → 跳過
→ 整條 Ollama 鏈(GCP-A → GCP-B → 111)全部略過,直接跳 Gemini
修復:
1. AIProviderEnum 新增 OLLAMA_GCP_A / OLLAMA_GCP_B / OLLAMA_LOCAL
2. PROVIDER_LATENCY_BUDGET 補齊三個新 enum
3. ollama.py 新增 OllamaGcpBProvider(OLLAMA_SECONDARY_URL = GCP-B 34.21.145.224)
4. _init_registry() 補登:
- "ollama_gcp_a" alias → OllamaProvider(GCP-A,OLLAMA_URL)
- OllamaGcpBProvider("ollama_gcp_b",OLLAMA_SECONDARY_URL)
- "ollama_local" alias → Ollama188Provider(111,OLLAMA_FALLBACK_URL)
修復後路由順序:GCP-A → GCP-B → Local(111) → Gemini → Claude
2026-05-04 ogt + Claude Sonnet 4.6
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 13:49:32 +08:00
..
2026-03-26 16:06:20 +08:00
2026-05-04 13:37:11 +08:00
2026-05-04 13:37:11 +08:00
2026-05-04 13:49:32 +08:00
2026-05-04 13:46:19 +08:00
2026-04-05 01:00:31 +08:00
2026-03-22 18:57:44 +08:00
2026-05-02 23:44:12 +08:00
2026-04-07 16:00:12 +08:00
2026-04-10 13:03:25 +08:00
2026-05-04 13:37:11 +08:00
2026-03-29 15:27:49 +08:00
2026-05-04 10:59:38 +08:00
2026-04-16 22:23:49 +08:00
2026-03-22 18:57:44 +08:00
2026-04-15 15:34:04 +08:00