fix(ai): NVIDIA 加入 Rate Limiter 檢查
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
E2E Health Check / e2e-health (push) Has been cancelled

2026-03-30 ogt: 修復 AI 仲裁降級問題

問題: NVIDIA RPM=5 限制未在 fallback 檢查
修正: 加入 nvidia 到 rate_limiter 檢查清單

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-30 01:18:11 +08:00
parent 19fff8339d
commit 8d70df3ea2

View File

@@ -855,8 +855,9 @@ class OpenClawService:
rate_limiter = get_ai_rate_limiter()
for provider in settings.AI_FALLBACK_ORDER:
# Rate Limit 檢查 (gemini/claude 需檢查ollama 不限)
if provider in ("gemini", "claude"):
# Rate Limit 檢查 (nvidia/gemini/claude 需檢查ollama 不限)
# 2026-03-30 ogt: 加入 nvidia (RPM=5 限制)
if provider in ("nvidia", "gemini", "claude"):
allowed, reason = await rate_limiter.check_and_increment(provider)
if not allowed:
logger.warning(