Responses API with 5.6 echoes nonsense "prompt_cache_retention": "24h"

You can send an ignored default to 5.6 and get no error:

"prompt_cache_retention": "24h"

It is also returned back to you on Responses API although you never sent nor set it.

The previously unneeded “in_memory” was added in case you want that memory-based behavior back on gpt-5.4 and before (giving short retention but what was previously 128 token cache increments of storage and matching).

An equally-valid misuse that would do nothing (but likely more accurate than accepting “24h”, considering ".ttl":"30m" of 5.6 cache) is invalid:

"prompt_cache_retention": "in_memory"

RuntimeError: HTTP 400
{
  "error": {
    "message": "This model is compatible only with 24h extended prompt caching",
    "type": "invalid_request_error",
    "param": "prompt_cache_retention",
    "code": "invalid_parameter"
  }
}

This model is “only compatible” is error message text meant for 5.5 (and its degraded 24h single cache write never previously explained). It can hint at what default will make a call accepted, but then OpenAI is still not delivering on the accepted request.

It makes no sense to return that error for 5.6 or fault on input validation of “in_memory” when the first “24h” is accepted and useless.

Better:

  • no incompatible keys echoed back
  • no success when you won’t get the requested performance

Better message after refusing the “prompt_cache_retention” parameter wholesale:

{
  "error": {
    "message": "invalid 'prompt_cache_retention'; This model is only compatible with prompt_cache_options.ttl = 30m",
    "type": "invalid_request_error",
    "param": "prompt_cache_retention",
    "code": "invalid_parameter"
  }
}

Alternately:

  • don’t validate and refuse model-ignored parameters.
  • return “in_memory” which doesn’t give a time promise
  • Add null or “auto” string to the prompt_cache_retention return key schema if required by SDKs.