智能体
dev.to ·
@xxxn3m3s1sxxx
每百万 0.10 美元的代码附带代价:你的训练数据
作者指出 Meta Contributor 档位约 0.10 美元/百万输入 token,比标准 API 低至 1/20,但条款写明提示与补全可能被用于改进 Meta 模型。文中描述其自托管 agent 集群会派生后台研究任务,若缺少门控,成本纪律会静默把请求路由到免费档位,使提示、补全、函数调用乃至代码库成为潜在训练材料,因此引入 SWARM_GATE_FREE 门控。核心观点是:token 折扣不等于实际支付货币的折扣。
AI推荐理由 文章指出 Meta Contributor 档位约 0.10 美元/百万输入 token,但条款允许将提示与补全用于改进 Meta 模型,并给出自托管 agent 集群中后台任务可能被静默路由到免费档位的具体工程实践(SWARM_GATE_FREE 门控)。属于开发者视角的成本与数据条款权衡,有具体价格与条款依据,但为个人博客经验,未提供独立验证。
70
正文
Meta's Contributor tier charges about $0.10 per million input tokens — up to 20x less than the standard API. The terms include a line you should read twice: your prompts and completions may be used to improve Meta's models.
The Case
We run a self-hosted swarm where agents spawn background research jobs. Cheapest provider wins, right? A free tier would drop our inference costs to zero — and every one of those spawned sessions would feed somebody's training run.
What Actually Happened
We stopped asking "can we afford this?" and started asking "what are we paying with?":
Cost discipline without a gate silently routes onto the free-tier default — the decision disappears into the config instead of into the review.
Every background spawn becomes potential training material: prompts, completions, function calls, the codebase itself.
A discount on tokens is not a discount on the currency you actually pay in.
Instead of paying silently: SWARM_GATE_FREE — a gate inside the swarm itself.
Proof (Swarm Finding)
Real code, 2026-09-18, our swarm. resolve_spawn_model() (opencode_run.py, lines 114–149) implements the free-tier gate route: SWARM_GATE_FREE=1 blocks silent free-tier default spawns — background research runs through local Ollama or BYOK routes, and an invalid target spawn is rejected with a clear error instead of starting silently. Tested in tests/test_opencode_run.py (SWARM_GATE_FREE cases); consensus documented in team-constitution.md § Free-Tier-Provider-Gate. See the full system story in the Pillar post.
The Lesson
Every price is a trade. Read the currency, not the zeros behind the dollar sign: $0.10/M is a training-data price, not an infrastructure price.
Saving money means knowing what you pay with. If your agent generates code on a contributor discount, your codebase is the input good.
Gates over wishes: deterministic blocking (error instead of spawn) is cheaper than "we'll keep an eye on it" in every single spawn.
Decide once, enforce everywhere — an env flag plus tests beats a rule label in the config jungle.
The Question
What's the cheapest inference tier you run in production — and what are you actually paying with?
Video
More about our swarm, the crashes and the fixes: YouTube
Built by the ERR.SYS / 0xRAGE404 team — see the full system in the Pillar post.