diff --git a/src/codegen/extensions/langchain/graph.py b/src/codegen/extensions/langchain/graph.py index 3685ea322..e5116630f 100644 --- a/src/codegen/extensions/langchain/graph.py +++ b/src/codegen/extensions/langchain/graph.py @@ -63,7 +63,7 @@ def create(self, checkpointer: Optional[MemorySaver] = None, debug: bool = False # the retry policy has an initial interval, a backoff factor, and a max interval of controlling the # amount of time between retries retry_policy = RetryPolicy( - retry_on=[anthropic.RateLimitError, openai.RateLimitError], + retry_on=[anthropic.RateLimitError, openai.RateLimitError, anthropic.InternalServerError], max_attempts=10, initial_interval=30.0, # Start with 30 second wait backoff_factor=2, # Double the wait time each retry