tmogeid/opencode-model-fallback — explained in plain English
Analysis updated 2026-05-18
Keep OpenCode sessions running automatically when a rate-limited AI model stops responding.
Define ordered fallback chains of backup models per agent.
Monitor fallback depth and model health with the /fallback-status command.
Track token and cost usage across model fallbacks.
| tmogeid/opencode-model-fallback | 0xkinno/neuralvault | 0xmayurrr/ai-contractauditor | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | hard | easy |
| Complexity | 2/5 | 4/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Add the plugin to OpenCode's config file and optionally define a fallback-models config JSON.
opencode-model-fallback is a plugin for OpenCode, an AI coding assistant, that keeps your chat session running when the AI model you are using stops responding. If a model like GPT, Claude, or Gemini becomes rate limited, overloaded, times out, or returns a server error, the plugin automatically switches to the next working model in a list you define, either by redirecting the message before it fails again or by replaying it after a failure happens. The problem it solves is simple: if you use OpenCode with several different AI providers, hitting a rate limit or a temporary outage normally interrupts your conversation and forces you to switch models by hand. This plugin removes that manual step. It keeps track of which models are currently healthy across your whole setup, remembers how many times a single message has already fallen back within one session, and walks through an ordered list of backup models whenever the one you are using fails. You install it by adding a line to OpenCode's configuration file, then set up your own rules in a separate configuration file. There you choose which kinds of errors should trigger a fallback, such as rate limits or timeouts, how long a failed model should be avoided before being tried again, and how many times the plugin is allowed to fall back within a single message. You can also define a different ordered list of backup models for each agent you use inside OpenCode, or set one default list that applies everywhere with a wildcard. The plugin adds a command called fallback-status that you can run inside any OpenCode session to see how deep the current fallback chain has gone, which models are currently marked unhealthy and for how long, and, in a more detailed mode, a breakdown of token use and cost during each fallback period. It also writes structured logs, with error messages from providers cleaned up before being saved, and includes a troubleshooting section covering common problems like a missing status command or an exhausted fallback chain. The project is written in TypeScript, uses Bun for development and testing, and currently has one star. The README does not mention a license.
An OpenCode plugin that automatically switches to a backup AI model when your current one is rate limited, overloaded, or fails.
Mainly TypeScript. The stack also includes TypeScript, OpenCode, Bun.
No license is mentioned in the README, so reuse terms are unclear.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.