anthropic-sdk-python icon indicating copy to clipboard operation
anthropic-sdk-python copied to clipboard

Support Prompt Caching with Vertex

Open willriley opened this issue 1 year ago • 5 comments

To my knowledge, prompt caching isn't supported when using Claude on Vertex, either via the messages API or the SDKs. Is there any ETA on when that will be added?

willriley avatar Sep 07 '24 15:09 willriley

We use Claude through vertex ai too, keeping an eye on this.

jennmueng avatar Sep 16 '24 18:09 jennmueng

That's a bummer for us and we might need to switch model if this is not supported soon.

ggdupont avatar Oct 09 '24 07:10 ggdupont

+1 Any updates on enabling context caching for Claude available through VertexAI?

codenprogressive avatar Dec 08 '24 15:12 codenprogressive

It is supported here: https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/claude-prompt-caching

daivitran avatar Jan 12 '25 03:01 daivitran

This is absolutely critical for things like agentic coding, where prompt caching results in around a 98% saving in cost.

Prompt caching works really well with Claude models GCP VertexAI directly, so this will be a bit of a blocker for a lot of folks wanting to use Claude on GCP, or using Claude models and wondering why they're paying 98% more.

sammcj avatar Mar 26 '25 23:03 sammcj