Support per rule model fallbacks for outages and credit depletion
Support the specification of multiple models per mode, in order of preference like so:
"mode": {
"build": { "models": ["google/gemini-2.5-pro", "openai/o4-mini"] }
}
I'm also quite interested in this actually, but I've nothing else to add outside of that unfortunately. The idea of being able to burn up one subscription to the end and fall back to another seems quite appealing- it'd help me make the most of my limits.
This would be very useful, I use OpenCode with subscriptions to GitHub Copilot, Claude Code, and GLM. When I hit the usage limits on any of them mid-task, the workflow gets interrupted. Having fallback models would make the tool more reliable and efficient.
this would definitely be a gamechanger especially with recent (un)developments r.e claude and their gatekeeping
Another use-case for this feature would be using the same model from different providers. For example, zAI's GLM-4.7 is offered by Cerebras at insane speeds, but the token-per-minute limits are exhausted pretty quickly. If we could have that by default, but then fallback onto Zen's GLM-4.7 and then after the minute go back to Cerebras, this would make the experience extremely smooth.
Very useful feature
Hey! I’m looking into implementing this. I’ve poked around the repo and the plan seems pretty straightforward:
- Update PermissionObject in config.ts so models can take an array.
- In processor.ts, wrap the LLM calls in a loop that catches 429s or credit depletion errors.
- If a model hits a wall, it just cycles to the next one in the list and retries the request.
I'm ready to start on a PR for this if the approach looks good to you guys.
Looks sensible to me. @manascb1344 It's more less what I expect.
+1 really need this!
I've made the PR for this!