Configures OpenAI prompt caching options for GPT‑5.6+ models.
// Source: https://github.com/langchain4j/langchain4j | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package dev.langchain4j.model.openai;
import static dev.langchain4j.internal.Utils.quoted;
import java.util.Objects;
/**
* Represents the {@code prompt_cache_options} request object supported by {@code gpt-5.6} and later.
* <p>
* On these models a cached prefix is matched exactly at a
* {@link OpenAiPromptCacheBreakpoint breakpoint}, without falling back to a shorter unmarked prefix.
* The {@code mode} controls where breakpoints come from:
* <ul>
* <li>{@link #MODE_IMPLICIT} - OpenAI places a breakpoint at the end of the newest eligible message.</li>
* <li>{@lin
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key