Skip to content

[BUG] Retry handling fails in some Bedrock throttling cases #905

@steffeng

Description

@steffeng

Checks

  • I have updated to the lastest minor and patch version of Strands
  • I have checked the documentation and this is not expected behavior
  • I have searched ./issues and there are no duplicates of my issue

Strands Version

1.8.0

Python Version

3.13.7

Operating System

MacOS

Installation Method

pip

Steps to Reproduce

Call agent with Bedrock model (see model id below) often enough during busy hours of Bedrock so that an error is issued like this (mind the spelling of throttlingException):

botocore.exceptions.EventStreamError: An error occurred (throttlingException) when calling the ConverseStream operation: Too many requests, please wait before trying again. You have sent too many requests. Wait before trying again.
└ Bedrock region: us-east-1
└ Model id: us.anthropic.claude-3-7-sonnet-20250219-v1:0

Expected Behavior

Retry is handled by the agent in the same way as it currently handles the same error code with uppercase T (ThrottlingException).

Actual Behavior

Error is raised without retry.

Additional Context

I raised a ticket to Bedrock team as well, but no plan to fix, yet.

Possible Solution

If the error code is present, do lower() before comparison to throttlingexception.

Related Issues

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions