opencode-free-rotation
Refresh OpenCode Zen free models and failover chain.
- License 许可
- MIT
- 所属仓库
- zapabob/Skills
- 最近更新
- 2026-10-26
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- opencode-free-rotation
- author
- Bob Nyan, Hermes Agent
- license
- MIT
- version
- 1.0.0
- metadata
- { "hermes": { "tags": [ "OpenCode", "Free-Models", "Failover", "Catalog", "Zen" ], "category": "autonomous-ai-agents", "related_skills": [ "opencode" ] } }
- platforms
- [ "linux", "macos", "windows" ]
- description
- Refresh OpenCode Zen free models and failover chain.
03 SKILL.md 正文
OpenCode Free Rotation
Keep Hermes on the current OpenCode Zen free catalog and rotate through free models when usage or token limits are hit.
When to Use
- OpenCode free models change and you want the live list refreshed
- A free model returns
Free usage exceededor similar limit errors - You need to verify the primary + fallback chain before a long session
- You want a scheduled catalog refresh (cron) to stay current
Prerequisites
OPENCODE_ZEN_API_KEYin~/.hermes/.env(from https://opencode.ai/auth)- Primary provider set to
opencode-zenwithmodel.default: auto-free - Optional local rollback:
llama-cpponhttp://127.0.0.1:8080/v1
Example config: docs/migration/opencode_free_webui_config.example.yaml
How Rotation Works
- Primary —
auto-freeresolves to the first live free model fromhttps://opencode.ai/zen/v1/models. - Runtime failover —
fallback_providersentry{"provider": "opencode-zen", "model": "auto-free"}expands to the full free sequence (deduped). - Limit detection —
Free usage exceededstyle errors are classified as transient rate limits, triggering the next model. - Local rollback — Final chain entry
llama-cppuses the designated GGUF via llama-server autostart.
Quick Reference
| Action | Command |
|---|---|
| Refresh catalog | terminal(command="py -3 scripts/refresh_opencode_free_catalog.py --force") |
| JSON output | terminal(command="py -3 scripts/refresh_opencode_free_catalog.py --force --json") |
| Show fallback chain | terminal(command="hermes fallback list") |
| Check llama fallback | terminal(command="py -3 -c \"from hermes_cli.llama_fallback_runtime import is_llama_fallback_ready; print(is_llama_fallback_ready())\"") |
Procedure
1. Verify credentials and config
model:
provider: opencode-zen
default: auto-free
fallback_providers:
- provider: opencode-zen
model: auto-free
- provider: llama-cpp
model: huihui-qwen35-4b-roleplay-unsloth-qlora-claude35-15k-ms2048-s800-curriculum1280-1152-q8_0.gguf
base_url: http://127.0.0.1:8080/v1
2. Refresh the live catalog
Run from the Hermes repo root:
terminal(command="py -3 scripts/refresh_opencode_free_catalog.py --force")
Compare output with hermes fallback list. Hermes expands auto-free at runtime — no manual model list edits are required when OpenCode adds new free IDs.
3. Schedule optional refresh (cron)
Use cronjob to refresh weekly and log drift:
cronjob(action="add", schedule="every monday 6am", prompt="Run py -3 scripts/refresh_opencode_free_catalog.py --force --json and summarize any new or removed free model IDs. If the catalog fetch fails, note the static fallback floor in hermes_cli/models.py.", no_agent=false)
Pitfalls
- Catalog fetch requires network access to
opencode.ai; offline mode uses the static free floor inhermes_cli/models.py. - WebUI reads raw
config.yaml—auto-freedisplays as-is in the picker but resolves correctly at agent runtime. - llama autostart only runs when
llama-cppappears infallback_providersorproviders.llama-cpp.
Verification
terminal(command="hermes fallback list")
terminal(command="py -3 scripts/refresh_opencode_free_catalog.py --force")
Expect a non-empty free model list and a final llama-cpp entry when local rollback is configured.
04 同仓库更多 Skills
xurl
X/Twitter via xurl CLI: post, search, DM, media, v2 API.
writing-plans
Write implementation plans: bite-sized tasks, paths, code.
whisper
OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.
weights-and-biases
W&B: log ML experiments, sweeps, model registry, dashboards.
watchers
Poll RSS, JSON APIs, and GitHub with watermark dedup.
serving-llms-vllm
vLLM: high-throughput LLM serving, OpenAI API, quantization.