Providers
Anthropic
Common questions about Anthropic provider
How do I use the Anthropic cache?
Anthropic cache allows you to cache parts of a prompt. As explained in their documentation, you need to opt-in within the prompt to start caching parts of it.
To do this, add cacheControl: true
to the front matter of your prompt.
Once this is set up, you can start caching specific parts of the prompt:
If you want an entire message to be cached, add the cache directive to the user
, assistant
, or system
tags:
How do I set the Anthropic thinking budget?
The latest Anthropic models have a configurable thinking budget that allows you to control the amount of time the model spends reasoning to generate a response.