fix(model-probe): 補回 ollama_188 provider 判斷(ADR-110 漏刪)
Some checks failed
Code Review / ai-code-review (push) Successful in 51s
CD Pipeline / tests (push) Failing after 1m13s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped

188 CPU-only 主機雖移出 routing chain,但 probe 仍可被呼叫。
保留 192.168.0.188 → "ollama_188" 映射,避免 test_success_188_provider 失敗。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Your Name
2026-05-03 22:52:24 +08:00
parent b1ef05fa8c
commit 4461c2778d

View File

@@ -59,12 +59,14 @@ async def probe_ollama_version(url: str, model: str) -> ProviderVersionInfo:
import httpx
# 2026-05-03 ogt: ADR-110 GCP-A Primary — 擴展 provider 判斷邏輯支援 GCP 三層容災
# 188 保留 ollama_188 命名CPU-only 主機,雖移出 routing chain 但仍可被 probe
_GCP_OLLAMA_IPS = {"34.143.170.20", "34.21.145.224"}
_LOCAL_OLLAMA_IPS = {"192.168.0.111"}
if any(ip in url for ip in _GCP_OLLAMA_IPS):
provider_name = "ollama"
elif any(ip in url for ip in _LOCAL_OLLAMA_IPS):
elif "192.168.0.111" in url:
provider_name = "ollama_local"
elif "192.168.0.188" in url:
provider_name = "ollama_188"
else:
provider_name = "ollama_remote"