Skip to content

Commit 6da1173

Browse files
authored
500 Error Anthropic Retry Policy (#789)
added `anthropic.InternalServerError` in the retry policy
1 parent 6629cd1 commit 6da1173

File tree

1 file changed

+1
-1
lines changed
  • src/codegen/extensions/langchain

1 file changed

+1
-1
lines changed

src/codegen/extensions/langchain/graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def create(self, checkpointer: Optional[MemorySaver] = None, debug: bool = False
6363
# the retry policy has an initial interval, a backoff factor, and a max interval of controlling the
6464
# amount of time between retries
6565
retry_policy = RetryPolicy(
66-
retry_on=[anthropic.RateLimitError, openai.RateLimitError],
66+
retry_on=[anthropic.RateLimitError, openai.RateLimitError, anthropic.InternalServerError],
6767
max_attempts=10,
6868
initial_interval=30.0, # Start with 30 second wait
6969
backoff_factor=2, # Double the wait time each retry

0 commit comments

Comments
 (0)