Backup AI Models for GitHub Code Review
CodeMouse lets you designate backup AI models for GitHub pull request reviews. Your primary review agents start in parallel. If a primary fails to complete its review, CodeMouse starts the enabled backup agents and combines their successful findings with any completed primary reviews. A backup adds a second way to get a review when a provider is down or out of credits.
You configure backups once in Dashboard → API Keys. Turn on Backup only on the provider or OpenRouter model card you want to keep in reserve. Leave at least one enabled model as primary. By default, enabled models are primary reviewers.
How backup review agents work
Say your team uses Claude and Gemini as primary reviewers and keeps an OpenRouter model in reserve. A developer opens a GitHub pull request. Claude and Gemini both start reviewing it.
| What happens | What CodeMouse does |
|---|---|
| Claude and Gemini both finish | Combines their findings and leaves the OpenRouter backup idle. |
| Claude runs out of credits and Gemini finishes | Starts the OpenRouter backup and keeps Gemini’s completed review. |
| Both primaries fail | Uses any review the backups successfully complete. |
| Every model that ran fails | Marks the review as failed so you can see the error. |
CodeMouse starts the backup group once, when the first primary fails. If you configured more than one backup, they start in parallel. A primary that’s still working can finish and contribute to the same review. CodeMouse merges findings and deduplicates overlap before posting to the pull request.
A provider error can trigger failover when the key runs out of credits, the service is unreachable, or the model response is still unusable after a reformat attempt. A valid review that finds a bug or requests changes counts as a completed review.
Parallel consensus or backup only
Use parallel consensus when you want several perspectives on every PR. Two models can spot different problems in the same change. For example, one might catch incorrect error handling while another notices that the tests miss an edge case. Leave Backup only off on both models to get both reviews each time.
Use backup only when you want another reviewer available for provider failures. You might prefer Claude on routine pull requests but want GPT or Gemini to take over if Claude is unavailable. The backup stays idle on healthy runs, so it adds no inference usage to those reviews. When failover happens, it takes time for the primary failure to surface and for backups to complete.
You can use both behaviors together. Keep two primary models for everyday consensus and a third in reserve. If a primary fails, the backup can still give you a second perspective alongside the remaining primary.
How to set up backup AI models in CodeMouse
- Open Dashboard → API Keys and connect the providers you want to use.
- Leave Backup only off on the enabled models that should review every pull request.
- Turn on Backup only for the provider you want in reserve. For OpenRouter, select a model and turn on the switch in that model’s card.
- Keep at least one enabled primary. Backup models are available for standard reviews, so turn off Economy mode if you use batch reviews.
Choose a backup with its own credentials if you want protection against a provider outage or account-wide spending limit. Two models behind one OpenRouter key can help if one model is unavailable. A separate provider gives the review another route if the OpenRouter account or service itself is unavailable. See supported AI models.
FAQ
What is a backup AI model for code review?
A backup AI model reviews the same GitHub pull request if a primary reviewer fails to complete its review. It can keep the review moving when a provider is unavailable, a key runs out of credits, or a model returns an unusable response.
Does a backup reviewer run on every pull request?
Backup-only reviewers run when a primary fails. On a healthy run, CodeMouse calls the primaries and leaves the backups idle. Your connected providers bill usage for the models that run under their own pricing.
Does CodeMouse rerun a successful primary review during failover?
CodeMouse keeps the completed primary result and merges it with successful backup findings. If another primary is still running when failover starts, it can also finish and contribute.
Can I use different OpenRouter models as primary and backup?
Yes. Each selected OpenRouter model has its own Backup only switch. For Anthropic, OpenAI, Gemini, and xAI, the switch applies to the model selected on the provider card.
Can I use backup models with Economy mode?
Backup-only models are for standard reviews. Turn off Economy mode to set up backups. To return to discounted batch reviews, turn off Backup only on your models before re-enabling Economy mode.