OpenRouter 探讨 AI Agent 长会话中的上下文腐烂与分块压缩方案
📊 核心数据与事实(2026-12-01):
OpenRouter 测试了五个 1M 上下文模型在长代码编写 Agent 会话中的表现,发现随着 Prompt 变长,模型在跨会话事件计数上的准确率会明显下降。直接丢弃旧消息会导致准确率暴跌,而采用分块压缩方案可以在将 Token 减少约五分之四的同时,将 2M 字符长度下的准确率从 49/60 提升至 54/60。
• 原文实测切片:| Session length | Claude Haiku 5.5 | GPT-6 Luna | Gemini 3.8 Flash | DeepSeek V4.1 Flash | MiniMax M3.1 Flash | | --- | --- | --- | --- | --- | --- | | 64K chars | 27K | 17K | 20K | 19K | 18K | | 256K chars | 105K | 67K | 78K | 74K | 70K | |…
• 原文实测切片:Question 64K chars (~20K tokens) 256K (~80K) 1M (~300K) 2M (~600K) 3.2M (~870K) Ticket ID, latest MAX_WORKERS, and early billing rule (each) 15/15 15/15 15/15 15/15 9/9 Count of failed test runs 10/15 6/15 5/15 4/15 4/9 The three single-fact…
• 原文实测切片:Here’s the average cost and time of one request (the final question) on October 22, 2026: Model 64K chars 1M chars 2M chars anthropic/claude-haiku-5.5 $0.0038, 14 s $0.206, 15 s $0.404, 22 s openai/gpt-6-luna $0.0015, 2 s $0.033, 9 s $0.130,…
💡 对独立开发者的启发:
1/ OpenRouter 测试了 AI Agent 在长对话中的上下文腐烂现象,并给出了分块压缩的具体方案。
2/ 面对新模型或开源组件先看三件事:许可证是否商用安全、API/推理边际成本降了多少、能不能直接嵌进现有变现工作流。
3/ 别去卷通用开发者轮子,把底层新能力包装成面向具体行业人群(电商、创作者、中小商家)傻瓜式交付结果的产品。
📅 日期:2026-12-01(北京时间)
📰 信息源出处:OpenRouter Blog(openrouter.ai)
🔗 原文:https://openrouter.ai/blog/tutorials/context-rot/
📡 归档:https://billionare.me/items/v2f2q8coue9y39809r0u5asjm
社媒成稿工作台 · 一键复制
飞书同步推送 · 含数据/日期/出处/启发