opencode 修复 GPT-6.2 缓存 bug,每步未缓存输入从 1.4 万 token 降至 3
victor_explore · x · 2026-11-19
opencode 发布 v2.3.2,修复一个影响所有 GPT-6.2 用户的计费问题:GPT-6.2 模型不会缓存经 Responses 接口 instructions 字段传入的 system prompt,导致 agent 每一步都把系统提示词按未缓存输入重新计费。
修复方式:opencode 现在把 system prompt 作为开头的 developer message 发送,覆盖 OpenAI(API key 与 ChatGPT 登录)、GitHub Copilot、Zen、Azure 和 OpenRouter 所有 Responses 路由,从第二步起即可命中缓存;/responses/compact 压缩也读取同一缓存前缀。
效果:在 GitHub Copilot 的 gpt-6.2-sol 上,每步未缓存输入从约 14,000 tokens 降至 3 tokens。另修复 webfetch structured output 重复传入 url 和 format 的问题。
对自建 agent 的人是个值得注意的坑:用 Responses 接口时 system prompt 的传入字段直接决定缓存是否生效。
「编程与Agent」频道最新
- Remotion 上线真·运动模糊:可让 AI agent 一句话自动添加 — Vjeux · 2026-11-19
- SREGym 开源:让 AI 智能体实战复现 Cloudflare、Reddit 等真实生产事故 — tianyin_xu · 2026-11-19
- LLM 不是 Agent:拆解智能体系统的 10 个组成部分 — goyalshaliniuk · 2026-11-19
- Uber、SpaceX 等齐聚首届 AI Software Factory 峰会 — Pavan_Belagatti · 2026-11-19
- 开发者用 GPT 6.2 Astra 做出 007 风格潜行游戏 — chongdashu · 2026-11-19
- 自主智能体为何会抛弃MCP,回归API与作用域令牌 — uriwa · 2026-11-19