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.

Original post →

More from coding & agent

coding & agent channel →