opencode-go-auto-switch
v0.1.2
Published
opencode plugin that switches free Zen Go models to paid Go models during quota cooldowns.
Downloads
485
Readme
opencode-go-auto-switch
Tiny opencode plugin that keeps agents configured with free Zen models and switches to paid Go models while the free quota is cooling down.
opencode/mimo-v2.5-free -> opencode-go/mimo-v2.5Install locally
In opencode.json:
{
"plugin": ["[email protected]"]
}Then restart opencode; config/plugins are loaded at startup.
Behavior
- Uses free models normally.
- When opencode emits:
Free usage exceeded, subscribe to Go retrying in 22747s - attempt #1 - Stores the cooldown globally at:
~/.local/state/opencode-go-auto-switch/state.json - Future prompts during cooldown switch matching models to paid Go.
- The quota-hit task should be cancelled and rerun manually for v1.
Options
{
"plugin": [["[email protected]", {
"stateFile": "/custom/state.json"
}]]
}Skipped: preflight checks and auto-retry. Add only if opencode exposes a safe cancel/replay hook.
