-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
This PR proposes expanding retry policy support in the Python SDK to more closely match the TypeScript SDK.
Currently, the Python SDK supports:
max_attempts
max_retry_duration
The TypeScript SDK supports additional parameters:
const myRunRetryPolicy = {
initialRetryIntervalMillis: 500,
retryIntervalFactor: 2,
maxRetryIntervalMillis: 1000,
maxRetryAttempts: 5,
maxRetryDurationMillis: 1000,
}
To provide similar flexibility in retry behavior for Python users, I suggest we consider adding the following parameters:
initial_retry_interval
(config.initial_interval already exists in the code, but not exposed)retry_interval_factor
max_retry_interval
These would allow users to more finely control backoff behavior and align feature parity across SDKs.
If this is not currently planned, I'm happy to contribute an implementation or build a wrapper if needed. Let me know what direction makes most sense.
Aditional question:
- Would you consider clarifying whether max_retry_duration is measured across all attempts of a single ctx.run() call, or across multiple calls?
avilaton
Metadata
Metadata
Assignees
Labels
No labels