prompt_cache_key Is Required on GPT-5.6 and Later
The mistake
Sending requests to a GPT-5.6-family model without setting prompt_cache_key, on the assumption that caching "just works" automatically the same way it did on earlier models — and then noticing, weeks later, that the caching discount on the bill is smaller than the workload's prefix-reuse pattern should produce.
Why this happens
Caching itself is still automatic above the minimum prefix length, with no code change required to turn it on at all — that part hasn't changed. What's new on GPT-5.6 and later is that the improved cache-matching behind these models is keyed more precisely, and prompt_cache_key is how you give it a stable identity to match against. Leave it unset, and matching still happens, just with looser guarantees about hitting the same cached prefix reliably as traffic volume grows.
Why it matters
The failure mode here is quiet. There's no error, no rejected request — just a lower hit rate than the workload's actual reuse pattern implies, which shows up only as an unexplained gap between the caching savings you expected and the ones you're actually seeing on the bill. That gap is much harder to debug after the fact than it would have been to prevent up front, because nothing in a single request's response tells you the key was the problem.
The fix
Set a stable prompt_cache_key per logical workload or shared prefix — the same key every time that prefix recurs, not a fresh one per request. If a single key is carrying more concurrent traffic than the published per-key rate recommendation, consider splitting that traffic across a small number of keys instead of one key absorbing everything, since traffic above that rate is where some requests may start missing even with a genuinely stable, correct prefix.
Worth naming the general pattern here, because it recurs across this whole family of models: a behavior that used to be entirely automatic becomes automatic-plus-one-required-field on the newer generation, and the migration guides that specifically cover moving a workload onto GPT-5.6 are the right place to catch this kind of thing systematically, rather than relying on noticing a smaller-than-expected discount weeks after the fact.
See also
The prompt-caching reference lays out the full mechanics — breakpoints, retention windows, and the write-versus-read economics that make getting the key right worth the five minutes it takes.
Verified 2026-08-09 against CodexHow facts module (src/data/facts/) — see /about/#accuracy.