From 08fcdcc2893b9ec03cc753ba0c603b93ed2c611f Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Mon, 16 Jun 2025 06:02:29 -0700 Subject: [PATCH] update with sonnet 4 --- .../model-providers/top-level/anthropic.mdx | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/docs/docs/customize/model-providers/top-level/anthropic.mdx b/docs/docs/customize/model-providers/top-level/anthropic.mdx index d7d1e325c..8a33e8a35 100644 --- a/docs/docs/customize/model-providers/top-level/anthropic.mdx +++ b/docs/docs/customize/model-providers/top-level/anthropic.mdx @@ -12,15 +12,15 @@ You can get an API key from the [Anthropic console](https://console.anthropic.co ## Chat model -We recommend configuring **Claude 3.5 Sonnet** as your chat model. +We recommend configuring **Claude 4 Sonnet** as your chat model. ```yaml title="config.yaml" models: - - name: Claude 3.5 Sonnet + - name: Claude 4 Sonnet provider: anthropic - model: claude-3-5-sonnet-latest + model: claude-sonnet-4-20250514 apiKey: ``` @@ -29,9 +29,9 @@ We recommend configuring **Claude 3.5 Sonnet** as your chat model. { "models": [ { - "title": "Claude 3.5 Sonnet", + "title": "Claude 4 Sonnet", "provider": "anthropic", - "model": "claude-3-5-sonnet-latest", + "model": "claude-sonnet-4-20250514", "apiKey": "" } ] @@ -60,9 +60,19 @@ Anthropic currently does not offer any reranking models. ## Prompt caching -Anthropic supports [prompt caching with Claude](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching). +Anthropic supports [prompt caching with Claude](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching), which allows Claude models to cache system messages and conversation history between requests to improve performance and reduce costs. -To enable caching of the system message and the turn-by-turn conversation, update your your model configuration as following: +Prompt caching is generally available for: + +- Claude 4 Sonnet +- Claude 3.7 Sonnet +- Claude 3.5 Sonnet +- Claude 3.5 Haiku +- Claude 3 Opus +- Claude 3 Sonnet +- Claude 3 Haiku + +To enable caching of the system message and the turn-by-turn conversation, update your model configuration as follows: @@ -70,7 +80,7 @@ To enable caching of the system message and the turn-by-turn conversation, updat models: - name: Anthropic provider: anthropic - model: claude-3-5-sonnet-latest + model: claude-sonnet-4-20250514 apiKey: roles: - chat @@ -90,7 +100,7 @@ To enable caching of the system message and the turn-by-turn conversation, updat }, "title": "Anthropic", "provider": "anthropic", - "model": "claude-3-5-sonnet-latest", + "model": "claude-sonnet-4-20250514", "apiKey": "" } ]