I reverse-engineered DeepSeek's prompt cache to make Claude Code hit it reliably — here's the undocumented behavior I found
Pointing Claude Code at DeepSeek's Anthropic-compatible endpoint should be dirt cheap (cache-hit input is ~2% of the miss price), but the cache barely hit for me. Digging into why turned up behavior that isn't in DeepSeek's docs and is useful whether or not you use my tool: DeepSeek re-renders before caching. It caches the rendered request (tools → system → messages), NOT the raw JSON body. CC serializes messages first, so raw byte-overlap between turns is ~6% — yet the hit rate is 66%. So body key order do
评论
?
参与讨论