Overview
This series compares Claude Code with cloud Opus against Opencode with an NVFP4-quantized GLM, treating each as a full service arrangement rather than an isolated model. It follows costs from cached context and GPU allocation through repair loops, accepted work, governance, and live latency, then examines API, shared, dedicated, and hybrid choices. The evidence supports conditional decisions, not a universal winner, and remains bounded by a one-developer case study, modeled TCO, and separate routing experiments.
Learning outcomes
- The meaningful economic unit is accepted software delivered through the full feedback loop.
- Prompt caching changes realized API economics, but it does not make repeated context or output free.
- Shared private capacity can lower modeled TCO, while dedicated reservation can lose when idle time is charged to one workload.
- Raw token speed does not guarantee faster accepted work when repair loops and validation dominate.
- Hybrid routing is a guarded policy, not a universal compromise; its evidence remains conditional on workload and serving state.
Keywords
Preview every chapter · Unlock full text, audio, and video from chapter 4
PlansFAQ
Is Claude Opus always more expensive than private GLM inference?
No. Caching made Opus cheaper per processed token in the measured workload, while shared private GLM had lower modeled true TCO and dedicated private capacity exceeded the API baseline.
Why is an AI coding agent's token bill different from its price sheet?
Because multi-turn sessions mix uncached input, cache writes, cache reads, and output at different rates; stable context can be reused, but changing input and output remain billable.
Why can a faster private model fail to reduce delivery time?
A faster decoder can still require more test, review, and repair rounds; queueing and validation may outweigh its generation-speed advantage before a change is accepted.
Does private inference eliminate security and operations work?
No. It keeps inference traffic inside the corporate network but shifts responsibility to internal isolation, cache and log controls, capacity, serving, upgrades, and incident response.
When is hybrid routing justified for coding agents?
Hybrid routing is justified when task stakes, repair tolerance, cost, and live latency differ enough to justify selective backend use and explicit escalation; the studies do not prove a universal hybrid gain.