forked from strands-agents/sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem Statement
Currently, in order to disable retry strategy, you need to set max attempts to 1.
Also setting retry strategy to None is equal to the default behavior where we retry models.
from strands import Agent, ModelRetryStrategy
agent = Agent(
retry_strategy=ModelRetryStrategy(max_attempts=1)
)Proposed Solution
This is not intuitive, and not a good DevX. As a developer, I'd expect retry_strategy=None to be no retries.
Instead the default should be
def __call__(retry_strategy=ModelRetryStrategy(max_attempts=MAX_ATTEMPTS, max_delay=MAX_DELAY, initial_delay=INITIAL_DELAY)):
...And retry_strategy=None should disable it.
Use Case
DevX
Alternatives Solutions
No response
Additional Context
As we have already released this, changing is backwards incompatible. As a result, we will fix/improve this in v2
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request