opencode-failover 是一个 OpenCode 插件,能够自动轮换和故障转移多个提供商的 API 密钥,对限速密钥进行隔离并永久禁用无效密钥,确保零停机 LLM 访问。

Stars

47

7 天增长

暂无数据

Fork 数

3

开放 Issue

0

开源协议

MIT

最近更新

2026-07-23

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它解决了开发者在使用同一或不同 LLM 提供商多个 API 密钥时的常见痛点,无需手动干预即可处理速率限制、认证失败和自动密钥轮换,并与 OpenCode 生态系统深度集成。

适合谁使用

  • 运行大量 LLM 请求的 OpenCode 用户
  • 管理多个 API 密钥(如 NVIDIA、OpenAI 或 Anthropic)的开发者
  • 需要自动故障转移以避免因速率限制导致请求失败的团队
  • 需要弹性 API 访问的自托管 AI 应用运维人员

典型使用场景

  • 轮换多个 NVIDIA NIM API 密钥以避免达到单密钥速率限制
  • 当 OpenAI 密钥耗尽或返回 429 时自动切换到其他密钥
  • 使用加权轮询分发管理一组 Anthropic 密钥
  • 通过 TUI 仪表板实时监控密钥健康状态

项目优势

  • 自动隔离并采用指数退避(60 秒至 300 秒)处理速率限制和服务器错误
  • 对认证失败(401/403)和计费错误(402)进行永久禁用
  • 支持加权轮询分配,实现精细的密钥管理
  • 提供自然语言工具和 TUI 斜杠命令,无需手动配置即可管理密钥

使用前须知

  • 仅适用于 OpenCode 生态系统,不是独立解决方案
  • 永久禁用的密钥需要手动重新启用
  • 依赖于相对小众的 OpenCode 平台,采用范围有限

README 快速开始

Quick Start

项目描述

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

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

7-e1even
精选
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 与机器学习大语言模型
218
makecindy
精选
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 与机器学习大语言模型
958
hahhforest
精选
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 与机器学习大语言模型
625