Note: in order to turn off a cache write at the end of a final user message (total length of input), include:
"prompt_cache_options": { # New for gpt-5.6 family [sol, terra, luna]
"mode": "explicit", # default "implicit", for only one total cache write
"ttl": "30m", # only one default parameter "30m" for 30 minutes
},
Larger issue: no cache writes at developer messages
Testing json_schema - chat completions - implicit cache
All calls against “gpt-5.6-terra”, default (null) reasoning/verbosity
Sending developer-only message: the AI has to infer an empty schema:
req_20570db7f5e24ff2939357f799bd5ae4
In implicit default, the issue: there is no cache write on only a developer message that is significantly in excess of the threshold.
"usage": {
"prompt_tokens": 1374,
"completion_tokens": 320,
"total_tokens": 1694,
"prompt_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 98,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
}
Making no implicit cache writes, when there is a structured response schema, might be reasonable default if one assumes that a JSON output will never be a growing response like a “chat”. You’ll see they didn’t do that, the API is messed up.
Testing json_object - chat completions - implicit cache
Turning off json_schema, for instead json_object (and the developer message already had high enough quality to operate alone):
req_cdac18a83fc84b97bfc78b81f21d9a42
"usage": {
"prompt_tokens": 1297,
"completion_tokens": 318,
"total_tokens": 1615,
"prompt_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 114,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
}
Then we still have “cache_write_tokens”: 0 in json object mode
Testing no response_format - chat completions - implicit cache
Final implicit test: using developer language only
req_7dbda6406a3b4a29a1dcf8cc27fed223
"usage": {
"prompt_tokens": 1297,
"completion_tokens": 329,
"total_tokens": 1626,
"prompt_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 42,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
}
No cache write was made on 1297 tokens sent - “cache_write_tokens”: 0,
I doubled up the developer message language: still no cache write:
req_81309862dfe7416394c227ebb87b70a7
"usage": {
"prompt_tokens": 2600,
"completion_tokens": 96,
"total_tokens": 2696,
"prompt_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
}
- The API is not fulfilling its promise of the amount for cache - PERIOD.*
Test with a “user” message included to actually get an instructed schema - THEN we get a cache write:
"usage": {
"prompt_tokens": 1334,
"completion_tokens": 224,
"total_tokens": 1558,
"prompt_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 1331,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
}
Switch that to a developer message as the second message, again NO implicit cache write at the end.
req_49447dea43f64c7b822525d7c7cf97de
“cache_write_tokens”: 0
Conclusion: OpenAI is not storing at developer message at end of input, as an automatic “prompt_cache_breakpoint”, or an explicit specification.
They expect “chat” patterns and can’t imagine anything else?
I think both of us have done plenty of free work for OpenAI, that this must be explained or fixed.
Symptom: A naive pattern of “preload” or “warm up” call will not generate a cache write where desired, and the first post shows failure even on explicit use mid-messages. An explicit use is also shown not to (didn’t test that myself).
Workaround: add a 1-part user message as an explicit write, and then use a 2-part user message in production of the next 30 minutes of calls. There, you can just send a linefeed as the first part. Alternately, a standalone “preprompt” user message 1 of no impact.