Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Why I moved my homelab's coding agent from Claude to OpenCode + OpenRouter — and what it actually costs now

说明与用途

将家庭实验室自动化从单一供应商迁移到 OpenCode + OpenRouter,将每月费用降至一杯咖啡的价格,消除了供应商锁定,并根据任务复杂度和成本实现了灵活的模型选择。

问题

The homelab automation was tightly coupled to a single vendor’s agent, model, and subscription, creating a single point of failure, inflexible cost structure, and limited ability to run locally for cheap tasks.

结果

The new architecture reduces monthly costs to roughly the price of a coffee, eliminates vendor lock‑in, and provides flexibility to route tasks to the most cost‑effective model while maintaining local execution for simple jobs.

工作流

  • 1. Install OpenCode as the coding agent on local infrastructure.
  • 2. Configure OpenRouter as the model layer API endpoint.
  • 3. Set the desired model (frontier, cheap, or local) in OpenCode’s configuration.
  • 4. Run automation tasks; OpenCode routes requests to the configured model via OpenRouter.
  • 5. Monitor and adjust model selection or add new models by editing a single config line.
  • 6. Maintain a blocklist of models that fail tool‑calling or truncate context.
  • 7. Use local models for low‑complexity tasks to keep costs near zero.
  • 8. Pay per token for expensive frontier model usage, resulting in a monthly bill comparable to a coffee.

证据

Most requests are routed to cheap or free models. The boring, high-volume work doesn't touch an expensive model at all.

来源

A lot runs locally for £0. Anything a small local model can handle — and that's more than you'd think for summarise/triage/draft work — runs on my own hardware and costs only electricity.

来源

Not every model can drive an agent. Agentic work needs reliable tool‑calling… I've had to measure this per-model and keep a blocklist of ones that quietly fail.

来源

  • 记录日期: 2026-09-15T17:15:13.739Z