Skip to content

Commit 4afa807

Browse files
committed
fix: increase bedrock retries
1 parent e4a8a5d commit 4afa807

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

e2e_tests/python/main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os
44
from typing import Any
55

6+
from botocore.config import Config
67
from strands import Agent
78
from strands.models import BedrockModel
89
from mcp_clients import (
@@ -64,10 +65,17 @@ def main() -> None:
6465
)
6566

6667
# Create Bedrock model
68+
retry_config = Config(
69+
retries={
70+
"max_attempts": 10,
71+
"mode": "standard",
72+
}
73+
)
6774
bedrock_model = BedrockModel(
6875
model_id="us.anthropic.claude-3-7-sonnet-20250219-v1:0",
6976
region_name="us-west-2",
7077
streaming=False,
78+
boto_client_config=retry_config,
7179
)
7280

7381
# Create agent with MCP tools

examples/chatbots/python/main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os
44
from typing import Any
55

6+
from botocore.config import Config
67
from strands import Agent
78
from strands.models import BedrockModel
89
from mcp_clients import (
@@ -63,10 +64,17 @@ def main() -> None:
6364
)
6465

6566
# Create Bedrock model
67+
retry_config = Config(
68+
retries={
69+
"max_attempts": 10,
70+
"mode": "standard",
71+
}
72+
)
6673
bedrock_model = BedrockModel(
6774
model_id="us.anthropic.claude-3-7-sonnet-20250219-v1:0",
6875
region_name="us-west-2",
6976
streaming=False,
77+
boto_client_config=retry_config,
7078
)
7179

7280
# Create agent with MCP tools

0 commit comments

Comments
 (0)