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
Problem Statement
Currently, in order to disable retry strategy, you need to set max attempts to 1.
Also setting retry strategy to
Noneis equal to the default behavior where we retry models.Proposed Solution
This is not intuitive, and not a good DevX. As a developer, I'd expect
retry_strategy=Noneto be no retries.Instead the default should be
And
retry_strategy=Noneshould 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