Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add APIConnectionError to rate limit errors for openai #198

Merged

Conversation

sdtblckgov
Copy link
Contributor

This PR contains:

  • New features
  • Changes to dev-tools e.g. CI config / github tooling
  • Docs
  • Bug fixes
  • Code refactor

What is the current behavior? (You can also link to an open issue here)

we don't handle APIConnectionError error properly for openAI, if I'm not mistaken. In anthropic.py an APIConnectionError is treated as a rate limit error and retried, but this is not the case in openai.py where we only retry on RateLimitError and APITimeoutError.

What is the new behavior?

now is_rate_limit returns true for APIConnectionErrors and they should be retried.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

no

Other information:

@jjallaire-aisi jjallaire-aisi merged commit ab317ff into UKGovernmentBEIS:main Aug 6, 2024
9 checks passed
lauritowal pushed a commit to lauritowal/inspect_ai that referenced this pull request Aug 19, 2024
XkunW pushed a commit to VectorInstitute/inspect_ai that referenced this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants