bulutmuf/opencode-failover ? reverse-engineered prompt
Reverse engineered prompt
Build me an OpenCode plugin that manages multiple API keys for the same AI provider so I do not get stuck when one key hits its limit. I want it to automatically rotate between keys, and if a key gets a 429 or similar limit error it should pause that key for a while with increasing wait times, then bring it back later. If a key fails because of bad auth or billing, disable it so it stops being used.
It should work with common providers like NVIDIA, OpenAI, Anthropic, and OpenRouter, and ideally any OpenCode compatible provider. I want to be able to add keys in plain English from the OpenCode TUI, save them to env config, remove keys later, and ask for a live keychain status view. A slash command for checking status would be great too.
Please include sensible config options for headers, bearer scheme, multiple providers, and weighted rotation. Add debug logging and make sure it respects retry after responses. Look up current OpenCode plugin docs if you need to.
Have a live product UI? Try website reverse