Skip to content

Support GPT-5.6 family prompt caching without changing older models #36315

Closed

Description

@AbdoKnbGit

Description

Summary

OpenAI added new prompt caching controls for GPT-5.6 and later models.

We should support those new options without changing the existing behavior for GPT-5.5 and older models.

Docs: https://developers.openai.com/api/docs/guides/prompt-caching

Why this matters

GPT-5.6 uses prompt_cache_key for more reliable cache matching, and supports request-wide cache settings through prompt_cache_options.

Older models should keep using the current behavior. The OpenAI docs say older models reject the new prompt_cache_options and prompt_cache_breakpoint fields, so we should only send the new fields when they are explicitly configured.

What should change

Add support for passing this through OpenAI provider options:

providerOptions: {
  openai: {
    promptCacheKey: "session-or-cache-key",
    promptCacheOptions: {
      mode: "implicit",
      ttl: "30m"
    }
  }
}

Activity

  1. github-actions commented on Jul 10, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • This appears to be a feature request, but it does not use the required [FEATURE]: title prefix
    • The Feature Request template requires a verification checkbox confirming the feature hasn't been suggested before — this is missing

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. Sun-ZhenXing commented on Aug 19, 2026

    @Sun-ZhenXing

    When using GPT 5.6 Luna, I occasionally encounter the following message: prompt_cache_retention is not supported on this model. This led to an interruption, I think it might be relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs:complianceThis means the issue will auto-close after 2 hours.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions