Skip to content

Anthropic prompt caching (inc. Anthropic on Bedrock)Β #1041

@heyjohnlim

Description

@heyjohnlim

Description

Hello, i am testing a port of my agentic app to Pydantic AI, and i would like to request easy support prompt caching ["cache-control"] = {"type": "ephemeral"} for Anthropic models.

I find that my costs are reduced by half when i enable this feature in my current app, and i think lots of people would find it beneficial. At the moment i am caching tool calls and system prompt.

Thanks in advance.

References

https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions