opencode 曝 compaction bug:摘要请求硬编码 1024 token 上限
d1g1t · ghdev · 2026-10-12
- opencode(v2.0.27)被曝一个已复现 bug:长会话(约 80K+ input tokens)触发自动/手动 compaction 时,摘要请求的输出被硬性限制在 1024 tokens,完全无视模型配置的 limit.output(案例中为 32768),导致 Compaction summary reached the output token limit 而失败——而绝大多数真实会话的摘要都需要超过 1K tokens。
- 复现方式:通过 openai-compatible 接入本地模型(如 llama.cpp 类服务器的 Qwen3 27B GGUF),在配置中设置 limit.output,服务端 GET /api/model 已确认加载了 32768 的输出上限,但实际 POST /v1/chat/completions 的 completion 恰好停在 1024、stop reason 为 length。
- 影响:使用自定义/本地模型的长会话用户基本无法完成 compaction。
「编程与Agent」频道最新
- 开源 AI 视频预演工具 CozyClay 获作者背书推荐 — cocktailpeanut · 2026-10-23
- Supabase 一键给应用装 MCP 服务器:ChatGPT/Claude 可直接调用你的应用 — dshukertjr · 2026-10-23
- Grok Bot 配「专属电脑」:浏览器+终端+云端文件系统直接干完任务 — nima_owji · 2026-10-23
- Neon 推出 TanStack AI 官方 AI Gateway 适配器,一个凭据调用多家模型 — matei_zaharia · 2026-10-23
- Reflection AI 演示 Beam 接入 opencode,自动微调 Gemma-4 准确率提升 66.5% — danielhanchen · 2026-10-23
- Cua 推出 Spaces SDK:让 Hermes 等 Agent 跑在你自己的电脑沙箱里 — Teknium · 2026-10-23