Class OpenAiOfficialPromptCacheOptions

java.lang.Object
dev.langchain4j.model.openaiofficial.OpenAiOfficialPromptCacheOptions

public class OpenAiOfficialPromptCacheOptions extends Object
Represents the prompt_cache_options request object supported by gpt-5.6 and later.

On these models a cached prefix is matched exactly at a breakpoint, without falling back to a shorter unmarked prefix. The mode controls where breakpoints come from:

Note that prompt_cache_options.ttl supersedes prompt_cache_retention, which applies to earlier models only. Setting both on the same request is rejected by OpenAI.

Since:
1.21.0
See Also: