-
Notifications
You must be signed in to change notification settings - Fork 446
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
Internal Server Error (500) when using Gemini API with Inspect framework #573
Comments
Hi @lennijusten , Have you been facing this issue since the beginning ? I mean is it like you were getting the response earlier and now facing this issue? Try upgrading the google.generative library once and then run your commands : pip install -q --upgrade google-generativeai Please let us know if you are still having the issue. |
Yes. It's been a semi-persistent problem throughout my usage of Gemini. Sometimes it works, but then after some number of requests or tokens, I get the Internal Server Error (500). The issue is also discussed here and here on Reddit. I ran If there is some kind of rate limit happening it would be useful for the error code to reflect that. With the current workings, I'm just burning tokens for nothing since my task never completes before the error. |
Hi @lennijusten . Sometimes we see Internal Server Error (500) because there are too many requests coming, which results in an unexpected error on Google's side. You can refer to this Troubleshooting doc "https://ai.google.dev/gemini-api/docs/troubleshooting?lang=python". I recommend temporarily switching to another model (e.g. from Gemini 1.5 Pro to Gemini 1.5 Flash) and see if it works. Internal Server Error (500) is not related to rate limit, but free tier does have rate limits based model variation. Please refer to this doc : "https://ai.google.dev/gemini-api/docs/models/gemini" or "https://ai.google.dev/pricing" If you want to upgrade to "Pay-as-you-go" tier, you need to set up a billing account. |
Hi, thanks for the report. There have been cases where bad inputs cause 500s. But it sounds like it wasn't consistent about which requests cause the error. Like @gmKeshari said the service used to throw 500 errrors when it's overloaded (I thing they've changed that to a clearer error) For intermittent errors, the SDK supports a 'retry' argument:
I think the default limit is 5min, but it's configurable. |
Description of the bug:
Description
I'm consistently encountering an Internal Server Error (HTTP 500) when trying to use the Google Gemini API through the Inspect evaluation framework. This error occurs during the
generate_content
call. I'm currently on the free trial.Steps to Reproduce
google/gemini-1.5-pro
)Error Message
InternalServerError: 500 An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting
Environment
Package Versions
Full error traceback:
Actual vs expected behavior:
No response
Any other information you'd like to share?
No response
The text was updated successfully, but these errors were encountered: