-
-
Notifications
You must be signed in to change notification settings - Fork 52.7k
Description
Summary
Bug Description
When the default model and first fallback provider both hit rate_limit cooldown, the fallback logic stops after trying only 2 models instead of continuing through all 17 configured fallback models.
Environment
- OpenClaw version: 2026.2.23
- Node: v22.22.0
- OS: Ubuntu 24.04
Configuration
{
“agents.defaults.model”: {
"primary": "qwen-portal/coder-model",
"fallbacks": [
"opencode/glm-5-free",
"opencode/kimi-k2.5-free",
"opencode/minimax-m2.5-free",
"opencode/gpt-5-nano",
"nvidia-nim/z-ai/glm5",
"nvidia-nim/qwen/qwen3.5-397b-a17b",
"nvidia-nim/moonshotai/kimi-k2.5",
"nvidia-nim/minimaxai/minimax-m2.1",
"nvidia-nim/z-ai/glm4.7",
"xfyun/xopglm47blth2",
"xfyun/xopglmv47flash",
"xfyun/xopglm5",
"xfyun/xopkimik25",
"xfyun/xminimaxm2",
"xfyun/MiniMax-M2.5",
"qwen-portal/vision-model"
]
}
}
Steps to Reproduce
- Configure 17 fallback models across multiple providers (qwen-portal, opencode, nvidia-nim, xfyun)
- Wait for qwen-portal and opencode to hit rate_limit cooldown
- Send a message to trigger model fallback ## Expected Behavior System should skip cooled-down providers and continue trying remaining fallback models (nvidia-nim, xfyun).
Actual Behavior
Error after trying only 2 models:
All models failed (2): opencode/glm-5-free: Provider opencode is in cooldown | qwen-portal/coder-model: Provider qwen-portal is in cooldownThe fallback logic does NOT continue to nvidia-nim or xfyun models.
Logs
All models failed (2): opencode/glm-5-free: Provider opencode is in cooldown (all profiles unavailable) (rate_limit) | qwen-portal/coder-model: Provider qwen-portal is in cooldown (all profiles unavailable) (rate_limit)
Impact
Users experience extended downtime (30-60 minutes) waiting for cooldown to expire, even though other providers (nvidia-nim, xfyun) are available and healthy.
Suggested
Fix The fallback logic should:
- Skip providers that are in cooldown state
- Continue through the entire fallbacks list until finding a working model
- Only fail after all fallbacks have been exhausted