fix(ai): keep openclaw before gemini in alert fallback
All checks were successful
Code Review / ai-code-review (push) Successful in 10s
CD Pipeline / tests (push) Successful in 1m9s
CD Pipeline / build-and-deploy (push) Successful in 3m28s
CD Pipeline / post-deploy-checks (push) Successful in 1m19s

This commit is contained in:
Your Name
2026-05-06 20:20:44 +08:00
parent bcb9397c38
commit d0e98192de
3 changed files with 33 additions and 0 deletions

View File

@@ -262,6 +262,14 @@ class OpenClawService:
cloud_aliases.get(provider_name, provider_name)
for provider_name in (cloud_provider_order or [])
}
try:
from src.services.ai_control import is_provider_disabled
if await is_provider_disabled("openclaw_nemo"):
cloud_candidates.discard("openclaw_nemo")
else:
cloud_candidates.add("openclaw_nemo")
except Exception as control_error:
logger.warning("alert_openclaw_nemo_control_check_failed", error=str(control_error))
# Gemini remains the final paid backup, but alert traffic should use
# OpenClaw/Nemo first whenever the router control plane has not disabled it.
cloud_candidates.add("gemini")