From ea76b08547c3d5de7f0906fb6cde274ec448cc98 Mon Sep 17 00:00:00 2001 From: Mackenzie Zastrow Date: Tue, 15 Jul 2025 10:23:24 -0400 Subject: [PATCH] Update default model to be Claude 4 Sonnet --- README.md | 2 +- src/strands/models/bedrock.py | 6 +++--- tests/strands/models/test_bedrock.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ed98d0012..6b30b1529 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ agent = Agent(tools=[calculator]) agent("What is the square root of 1764") ``` -> **Note**: For the default Amazon Bedrock model provider, you'll need AWS credentials configured and model access enabled for Claude 3.7 Sonnet in the us-west-2 region. See the [Quickstart Guide](https://strandsagents.com/) for details on configuring other model providers. +> **Note**: For the default Amazon Bedrock model provider, you'll need AWS credentials configured and model access enabled for Claude 4 Sonnet in the us-west-2 region. See the [Quickstart Guide](https://strandsagents.com/) for details on configuring other model providers. ## Installation diff --git a/src/strands/models/bedrock.py b/src/strands/models/bedrock.py index ce76a246a..c748843e8 100644 --- a/src/strands/models/bedrock.py +++ b/src/strands/models/bedrock.py @@ -25,7 +25,7 @@ logger = logging.getLogger(__name__) -DEFAULT_BEDROCK_MODEL_ID = "us.anthropic.claude-3-7-sonnet-20250219-v1:0" +DEFAULT_BEDROCK_MODEL_ID = "us.anthropic.claude-sonnet-4-20250514-v1:0" DEFAULT_BEDROCK_REGION = "us-west-2" BEDROCK_CONTEXT_WINDOW_OVERFLOW_MESSAGES = [ @@ -67,7 +67,7 @@ class BedrockConfig(TypedDict, total=False): guardrail_redact_output: Flag to redact output if guardrail is triggered. Defaults to False. guardrail_redact_output_message: If a Bedrock Output guardrail triggers, replace output with this message. max_tokens: Maximum number of tokens to generate in the response - model_id: The Bedrock model ID (e.g., "us.anthropic.claude-3-7-sonnet-20250219-v1:0") + model_id: The Bedrock model ID (e.g., "us.anthropic.claude-sonnet-4-20250514-v1:0") stop_sequences: List of sequences that will stop generation when encountered streaming: Flag to enable/disable streaming. Defaults to True. temperature: Controls randomness in generation (higher = more random) @@ -432,7 +432,7 @@ def _stream( ): e.add_note( "└ For more information see " - "https://strandsagents.com/user-guide/concepts/model-providers/amazon-bedrock/#model-access-issue" + "https://strandsagents.com/latest/user-guide/concepts/model-providers/amazon-bedrock/#model-access-issue" ) if ( diff --git a/tests/strands/models/test_bedrock.py b/tests/strands/models/test_bedrock.py index 6060500b5..47e028cb9 100644 --- a/tests/strands/models/test_bedrock.py +++ b/tests/strands/models/test_bedrock.py @@ -1148,7 +1148,7 @@ async def test_add_note_on_access_denied_exception(bedrock_client, model, alist) "└ Bedrock region: us-west-2", "└ Model id: m1", "└ For more information see " - "https://strandsagents.com/user-guide/concepts/model-providers/amazon-bedrock/#model-access-issue", + "https://strandsagents.com/latest/user-guide/concepts/model-providers/amazon-bedrock/#model-access-issue", ]