-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
⚠️ Upgrade 2026.6.1 broke DeepSeek prompt cache - $6 burned in one hour #91018
Copy link
Copy link
Closed as duplicate
Closed as duplicate
Copy link
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Priority
None yet
环境
deepseek/deepseek-v4-flash)openai-completions问题描述
从 2026.5.7 升级到 2026.6.1 后,DeepSeek 的 Prompt Cache 完全失效。
关键指标
prompt_tokens_details.cached_tokens字段,说明服务端根本不认缓存 key根因分析
① 缺少
supportsPromptCacheKey: true2026.6.1 引入了 "boundary-aware" 缓存系统。文档明确说明:
但对于旧版本升级上来的用户,这个字段不会自动补入 config,需要手动添加。全新安装的用户可能通过 wizard 自动配置好了,但升级用户直接被坑。
② 修复后仍然无效
即使通过
openclaw config set正确添加了supportsPromptCacheKey: true,DeepSeek V4 Flash 仍然不返回任何缓存命中信息。OpenClaw 文档也承认:实际上是 0 cached_tokens 持续了整个会话。
③ 边界感知缓存与 DeepSeek 不适配
OpenClaw 的边界感知系统将系统提示词分为 "稳定前缀 + 易变后缀",适用于 Anthropic/OpenAI 的缓存标记机制。但 DeepSeek 使用的是纯前缀匹配 + best-effort 缓存,边界分割反而阻止了 DeepSeek 对完整前缀进行缓存。
损失统计
建议
supportsPromptCacheKey应默认内置(或在文档中大幅强调)备注
最终回退到 2026.5.7 后,缓存命中率恢复正常(97-100%),但损失已无法追回。