发表机构
PEGAVERSE Pegatron Corporation(PEGAVERSE 联合科技公司)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
研究企业编码代理中云与本地大语言模型的权衡,通过案例研究对比两者,发现提示缓存可大幅降低API成本,本地配置缺陷修复负担高,不同场景下各有成本优劣,混合路由网关在成本与质量间有平衡表现。
AI 中文摘要
自主编码代理迫使工程组织在基于API的前沿模型(高令牌成本下推理能力强)和本地量化开放权重模型之间做出选择,后者保证低边际成本扩展和数据主权,但推理保真度有所损失。我们通过对一个生产单体仓库进行为期两个连续28天的单开发者、非随机纵向案例研究来探讨这种权衡。对比基于API的Claude Opus 4.7/4.8配置与本地GLM-5.1/5.2配置。分析发现提示缓存将实际API成本降低88.6%,本地配置的缺陷修复负担更高。在不同市场参数和劳动模型下,本地部署有成本优势,但存在开发者体验负担,混合路由网关在成本-质量前沿以缺陷率换取基础设施节省而非主导纯API基线。
英文摘要
Autonomous coding agents force engineering organizations to choose between API-based frontier models -- strong reasoning at high token cost -- and on-premise quantized open-weights models, which promise low-marginal-cost scaling and data sovereignty at some loss of reasoning fidelity. We study this trade-off through a single-developer, non-randomized longitudinal case study over two contiguous 28-day periods on a production monorepo: an API-based Claude Opus 4.7/4.8 configuration using Claude Code versus an on-premise GLM-5.1/5.2 configuration using Opencode, quantized to NVFP4, on NVIDIA Blackwell hardware. Analyzing LLM telemetry and Git history, we find that prompt caching (99.3% hit rate) cuts realized API cost by 88.6% to an effective \$0.57 per million tokens -- below even the \$2.83 amortized unit cost of the shared on-premise slice (a utilization-dependent inversion; total realized spend and total cost of ownership (TCO) are the robust quantities). At comparable gross code churn, the local configuration was associated with a far higher defect-repair burden: a Fix Commit Ratio (FCR) of 74.9% versus 45.9%, with the odds of a commit being a repair 2.6 to 4.9 times higher within every difficulty tier (Mantel-Haenszel OR = 3.61). Under Taiwan-market parameters and a symmetric labor model, on-premise deployment nonetheless saves 40.1% of true TCO under shared GPU allocation, whereas dedicated reservation costs 43.8% more than the cached API. Under shared allocation, the genuine penalty is not monetary but a measurable developer-experience burden -- timestamp indicators show more work trapped in debugging spirals and a slower commit cadence -- and an offline replay shows hybrid routing gateways trade defect rate for infrastructure savings along a cost-quality frontier rather than dominate the pure-API baseline.
Comments20 pages, 13 figures, 14 tables. Industrial longitudinal case study