OpenAI has launched an improved prompt caching system with the GPT-6 family of models. This update aims to enhance the performance and cost-efficiency of applications, particularly those using persistent agents that make sequential API requests.
The new system offers higher cache hit rates by default and provides developers with tools to monitor and optimize cache performance. It also introduces new controls for managing how prompts are cached.
Key Points
- The GPT-6 family of models includes an improved prompt caching system.
- Cache discounts are now provided for eligible shared prefixes reused within a 30-minute window.
- A new Prompt Caching Dashboard allows developers to track cache hit rates and compare cached versus uncached tokens.
- A prompt caching diagnostics tool helps identify reasons for cache misses, such as changes to the model, tools, settings, or input.
- Explicit cache breakpoints enable developers to choose which prompt prefixes to reuse.
- GPT-6 models allow adjusting reasoning effort between responses without breaking the cache.
- Developers can preserve cache even when tools and instructions change by maintaining stable tool definitions or using
allowed_toolsandtool_choice. - Prewarming the cache can reduce latency by preparing known context in advance.
Context
According to OpenAI, persistent agents using GPT-6 can operate for hours on complex tasks, such as refactoring code or generating documents. These applications often involve a series of API requests that build upon previous interactions, frequently carrying forward the same instructions, tool definitions, and context. OpenAI caches this shared context to reuse computation across requests, which reduces response times and offers developers discounts of up to 90% on cached input tokens.
Why It Matters
These improvements offer developers greater control over caching behavior and provide insights into cache performance, potentially leading to significant reductions in operational costs and improved application responsiveness for GPT-6 users.
What To Do
- Monitor cache hit rates using the new Prompt Caching Dashboard.
- Investigate unexpected cache misses with the prompt caching diagnostics tool.
- Review the refreshed prompt caching guide to understand how to use explicit cache breakpoints and manage tool changes.
- Consider prewarming the cache for applications with known, reusable contexts to reduce user-facing latency.
