Skip to content

Feature Request: Add support for prompt caching #740

@joe-elliott

Description

@joe-elliott

Anthropic allows specific messages to be flagged for cache using a field: "cache_control": {"type": "ephemeral"}.

I'm not 100% sure, but it seems like ChatGPT and Gemini do this automatically?

I would like access to this feature in Anthropic for large, repetitive prompts (in my case TraceQL docs). Does it make sense to add this feature when one only provider requires it to be explicitly added? It is a nice cost and latency reduction. Am I correct that only Anthropic requires this to be explicitly flagged?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions