-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Feat codebase indexing add gemini as provider #3971
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 codebase indexing add gemini as provider #3971
Conversation
121fb4d to
dfd9c66
Compare
…control in settings
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
…bedder - Introduced SlidingWindowRateLimiter to manage request rates effectively, ensuring consistent request handling and memory efficiency. - Added RetryHandler with exponential backoff and jitter to handle transient failures during API calls. - Refactored CodeIndexGeminiEmbedder to utilize the new rate limiter and retry handler, improving error handling and request management. - Enhanced batch processing logic for embedding texts, ensuring better performance and reliability.
…ing on model support
|
Hi, @daniel-lxs
|
|
Thank you @ChuKhaLi! I see that there's a failing unit test, do you mind taking a look? |
|
all passed now @daniel-lxs |
|
I've been thinking about this PR for a while now. The 429 errors from We might need to step back and figure out a more reliable way to support indexing without running into performance or rate limit issues. I'm marking this PR as a draft for now, feel free to leave your thoughts! |
|
switch to text-embedding-004 its quite high limit and fast, the quality is obviously not as good but a good starting point for gemini provider. Later when they take this new model out of experiment we can then include it? |
|
#5228 Has been created to implement this better. The exp model is unusable with 5 request/ minute . There's no need to add so much complixity in a task this simple . Further that pr allows us to go past the limitation ( batching ) of Google Gen AI client. making the process almost 10X Faster |
Related GitHub Issue
Closes: #3967
Description
Add Google Gemini as provider for codebase indexing
Test Procedure
Type of Change
srcor test files.Pre-Submission Checklist
npm run lint).console.log) has been removed.npm test).mainbranch.npm run changesetif this PR includes user-facing changes or dependency updates.Screenshots / Videos
After add Gemini as provider

Documentation Updates
Does this PR necessitate updates to user-facing documentation?
Additional Notes
Get in Touch
Important
Adds Google Gemini as a provider for codebase indexing, updating configurations, UI, and tests to support it, along with new rate limiting and retry utilities.
codebase-index.tsandprovider-settings.ts.CodeIndexConfigManagerinconfig-manager.tsto handle Gemini-specific configurations.CodeIndexGeminiEmbedderinembedders/gemini.tsfor embedding tasks.CodeIndexSettings.tsxto include Gemini-specific settings and controls.config-manager.spec.tsandservice-factory.spec.tsto cover Gemini configurations.SlidingWindowRateLimiterinrate-limiter.tsfor rate limiting.RetryHandlerinretry-handler.tsfor handling retries with backoff.This description was created by
for 2149430. You can customize this summary. It will automatically update as commits are pushed.