-
Notifications
You must be signed in to change notification settings - Fork 894
running into request rate limiting error frequently for openAI models #782
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
Comments
Seems like a reasonable request, PR welcome. |
I like to take this can you guys specify the reproduction step @samuelcolvin @saipavankumar-muppalaneni ?? PS: The CONTRIBUTE.md is missing. |
It is just an agentic workflow where the agent hits a couple of tools to get back search results for a query, the agent then has to decide if the search results are satisfactory, if not then the agent will again make a search request using the tool, this loop continues until the agent is satisfactory. This back and forth happens rapidly at (@ nearly 1 request per second) and that seems to be causing rate limiting error with OpenAI I believe. I tried to reproduce the error and now my agent is hitting all kinds of rate limits from RPM, TPM, and content length. Maybe it's a good idea to have control over these to avoid agent crashes in production. |
I use
|
+1 this. I may be able to open the PR. |
I just opened a PR for this #1734 |
The rate limiting algorithm I like to use is GCRA because it doesn't require a background process to leak the bucket. So would it make sense to add an API to allow custom rate limiters? Langchain has this. |
Uh oh!
There was an error while loading. Please reload this page.
How can I set request rate limits in pydanticAI ?
The text was updated successfully, but these errors were encountered: