opencode-failover is an OpenCode plugin that automatically rotates and failovers API keys across multiple providers, quarantining rate-limited keys and permanently disabling invalid ones to ensure zero-downtime LLM access.

Stars

47

7-day growth

No data

Forks

3

Open issues

0

License

MIT

Last updated

2026-07-23

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It solves a common pain point for developers using multiple API keys from the same or different LLM providers by handling rate limits, authentication failures, and automatic key rotation without manual intervention, all integrated into the OpenCode ecosystem.

Who it is for

  • OpenCode users running large numbers of LLM requests
  • Developers managing multiple API keys for providers like NVIDIA, OpenAI, or Anthropic
  • Teams seeking automated failover to avoid request failures due to rate limits
  • Self-hosted AI application operators who need resilient API access

Use cases

  • Rotating through multiple NVIDIA NIM API keys to avoid hitting per-key rate limits
  • Failing over between OpenAI keys when one is exhausted or returns a 429
  • Managing a pool of Anthropic keys with weighted round-robin distribution
  • Using the TUI dashboard to monitor key health and status in real time

Strengths

  • Automatic quarantine with exponential backoff (60s to 300s) on rate limits and server errors
  • Permanent disable on authentication (401/403) and billing (402) failures
  • Supports weighted round-robin distribution for fine-grained key management
  • Offers natural language tools and a TUI slash command for key management without manual config

Considerations

  • Only works within the OpenCode ecosystem, not a standalone solution
  • Requires manual re-enabling of permanently disabled keys
  • Adoption depends on the relatively niche OpenCode platform

README quick start

Quick Start

Description

OpenCode plugin for automatic API-key failover and rotation across multiple provider keys

Related repositories

Similar projects matched by category, topics, and programming language.

7-e1even
Featured
7-e1even GitHub avatar

learn-agent

A collection of notes on building coding agents, derived from the production development of the desktop agent Reina, with each mechanism simplified into a zero-dependency, single-file Node.js demo.

AI & Machine LearningLarge Language Models
218
makecindy
Featured
makecindy GitHub avatar

cindy

Cindy is an open-source AI agent that runs locally on your machine, integrates multiple AI harnesses and models, and provides memory, skills, and automation to perform real work in your projects and apps.

AI & Machine LearningLarge Language Models
958
hahhforest
Featured
hahhforest GitHub avatar

pi-textbook

A hands-on course that walks through building a Pi-style coding agent from scratch across 15 checkpoints, starting from an offline agent trajectory.

AI & Machine LearningLarge Language Models
625