DeepSeek v4.1-flash prompt cache collapses above ~256k tokens, 4-6x cost spike
LionelODK · ghdev · 2026-10-23
An opencode user reports that since 2026-10-17, opencode/deepseek-v4.1-flash stops reusing the prompt cache once prompts exceed 256k tokens: cached prefix drops to a constant 16,640 tokens and the rest is re-billed at the uncached rate every turn.
Measured costs in that regime are 4-6x normal, with 64% of the reporter's spend since the date going to over-threshold turns. Previously cache hit rates held at 96-99% even up to 538k-token prompts. The issue includes a reproduction method via opencode's session database, reading tokens.input and tokens.cache.read per turn.
More from coding & agent
- Devs debate codex: remote control mode called 'miles better' in workflow comparison — _sholtodouglas · 2026-10-24
- Dev Vibe-Codes MOSS Image Studio, a Friendlier Browser Frontend for ComfyUI — Roorem10 · 2026-10-24
- He Built Custom TV Launchers for Guests and His Backyard With Claude Code — rephlektiv · 2026-10-24
- Claude skill claims to replace Higgsfield Genjutsu with Seedance 2.5 video editing — aziz4ai · 2026-10-24
- Daniel Miessler: code is the lossy output — the primary artifact is the fully articulated ideal in language — JensHonack · 2026-10-24
- 5 'OpenAI-Compatible' API Lies We Hit Building an AI Gateway — respan-81 · 2026-10-24