GPT-6 Prompt Caching: Better Hit Rates, New Diagnostics, and Optimization Tips

OpenAI introduced an improved prompt caching system for the GPT-6 model family, designed to support persistent agents that work on long-running tasks. These agents make sequences of API requests that share common context—such as instructions, tool definitions, and earlier conversation turns. The new system reuses computation across these shared prefixes, offering faster response times and discounts of up to 90% on cached input tokens. By default, the upgraded engine achieves higher cache hit rates, and cache discounts now apply to eligible shared prefixes reused within a 30-minute window.

To help developers understand and optimize caching behavior, OpenAI added two monitoring tools. The Prompt Caching Dashboard visualizes the proportion of application input served from cache, tracks hit rates over time, and compares cached versus uncached tokens. This helps identify drops in cache hits and evaluate how changes to the application affect caching performance. The prompt caching diagnostics tool enables developers to investigate unexpected cache misses by comparing a request with a recent response. It pinpoints changes to the model, tools, settings, or input that prevented reuse, and estimates the number of affected tokens to gauge the impact and guide optimization efforts.

The announcement also describes several ways to optimize caching for specific workloads. Explicit cache breakpoints allow developers to control which prompt prefixes are reused, with guidance on how long cached prefixes remain eligible and how tool or input changes affect reuse. A notable improvement on GPT-6 models is the ability to adjust reasoning effort without breaking the cache. Developers can append a configuration_update to raise or lower reasoning effort for individual follow-ups while keeping request-level reasoning effort unchanged, thus preserving reusable context. To maintain cache effectiveness as tool needs evolve, OpenAI advises keeping tool definitions, schemas, and ordering stable. Instead of removing definitions, developers should use allowed_tools to restrict callable tools or set tool_choice to none when no tools are needed. New developer messages can be appended at the end of the context to override older instructions without invalidating earlier content.

Additionally, prewarming the cache is suggested to reduce latency. Applications can preload shared instructions, tool definitions, or reference material during startup—before a user sends a request—so that processing happens ahead of time and the model responds sooner. These controls are optional and build on the engine’s default caching performance, enabling developers to fine-tune caching to their specific workflows.

The article frames these features as part of a broader effort to make agent-based applications more efficient and responsive. It encourages developers to monitor cache hit rates in the dashboard, investigate misses with the diagnostics tool, follow the prompt caching guide for setup improvements, and use Codex to review code, apply improvements, and measure results. However, the article does not provide specific benchmark numbers or performance comparisons beyond the stated 90% discount and the 30-minute eligibility window.

Better prompt caching for GPT-6

View Original