forked from SakanaAI/AI-Scientist
-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Add comprehensive rate limit handling across API providers #2
Open
devin-ai-integration
wants to merge
9
commits into
main
Choose a base branch
from
devin/1734538295-rate-limit-handling
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add new model identifiers to AVAILABLE_LLMS - Extend create_client for new model support - Add environment variable validation - Implement model-specific response handling - Update requirements.txt with google-cloud-aiplatform Co-Authored-By: Erkin Alp Güney <[email protected]>
Co-Authored-By: Erkin Alp Güney <[email protected]>
Co-Authored-By: Erkin Alp Güney <[email protected]>
It is quite difficult for weak models to do so based on the default template, as one error in replaced text can lead to termination of editing in the *SEARCH/REPLACE mode*. Splitting the text into segments and enabling "whole" mode editing helps solve this problem. The approach was tested on the "2d_diffusion" task using the "groq/llama3-8b-8192".
…n with segmented templates Co-Authored-By: Erkin Alp Güney <[email protected]>
…on support Co-Authored-By: Erkin Alp Güney <[email protected]>
…rs, and template compatibility Co-Authored-By: Erkin Alp Güney <[email protected]>
- Add retry limit and better error handling in extract_json_between_markers - Replace assert statements with try-catch blocks across all files - Add proper error messages and recovery mechanisms - Prevent infinite loops when JSON extraction fails Fixes SakanaAI#154 Co-Authored-By: Erkin Alp Güney <[email protected]>
- Add RateLimitHandler class for managing rate limits - Implement provider-specific request queues and locks - Add proper error handling and logging - Extend backoff patterns to all API providers - Add user feedback during rate limiting Fixes SakanaAI#155 Co-Authored-By: Erkin Alp Güney <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
Add "(aside)" to your comment to have me ignore it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add comprehensive rate limit handling across API providers
This PR implements robust rate limit handling across all API providers used in the AI-Scientist framework, addressing the continuous retry issue (SakanaAI#155).
Changes
Implementation Details
rate_limit.py
module for rate limit handlingTesting
The changes have been tested by:
Impact
These changes make the system more robust by:
Fixes SakanaAI#155
Link to Devin run: https://app.devin.ai/sessions/2ec43d6fe7a84849a348753167e5a895