git404hub

what is opencode-model-fallback fr?

tmogeid/opencode-model-fallback — explained in plain English

Analysis updated 2026-05-18

1TypeScriptAudience · developerComplexity · 2/5Setup · easy

tl;dr

An OpenCode plugin that automatically switches to a backup AI model when your current one is rate limited, overloaded, or fails.

vibe map

mindmap
  root((opencode-model-fallback))
    What it does
      Auto model failover
      Preemptive redirect
      Health tracking
    Tech stack
      TypeScript
      OpenCode
      Bun
    Use cases
      Avoid rate limit interruptions
      Per-agent fallback chains
      Session status command
    Audience
      Developers
      OpenCode users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Keep OpenCode sessions running automatically when a rate-limited AI model stops responding.

VIBE 2

Define ordered fallback chains of backup models per agent.

VIBE 3

Monitor fallback depth and model health with the /fallback-status command.

VIBE 4

Track token and cost usage across model fallbacks.

what's the stack?

TypeScriptOpenCodeBun

how it stacks up fr

tmogeid/opencode-model-fallback0xkinno/neuralvault0xmayurrr/ai-contractauditor
Stars111
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyhardeasy
Complexity2/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

Add the plugin to OpenCode's config file and optionally define a fallback-models config JSON.

No license is mentioned in the README, so reuse terms are unclear.

in plain english

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.

prompts (copy fr)

prompt 1
Help me configure opencode-model-fallback with a fallback chain for my build and coder agents.
prompt 2
Explain what triggers a fallback in this plugin versus a preemptive redirect.
prompt 3
Walk me through troubleshooting a missing /fallback-status command in OpenCode.
prompt 4
Show me how to set cooldown and retry timing for a rate-limited model in this plugin's config.

Frequently asked questions

what is opencode-model-fallback fr?

An OpenCode plugin that automatically switches to a backup AI model when your current one is rate limited, overloaded, or fails.

What language is opencode-model-fallback written in?

Mainly TypeScript. The stack also includes TypeScript, OpenCode, Bun.

What license does opencode-model-fallback use?

No license is mentioned in the README, so reuse terms are unclear.

How hard is opencode-model-fallback to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is opencode-model-fallback for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.