Feat/gemini embedding model#5665
Feat/gemini embedding model#5665Jopo-JP wants to merge 13 commits intoRooCodeInc:mainfrom Jopo-JP:feat/gemini-embedding-model
Conversation
There was a problem hiding this comment.
Update the JSDoc for the 'model' parameter – it now honors a provided value (using model || GEMINI_MODEL) instead of always ignoring it.
| * @param model Optional model identifier (ignored - always uses text-embedding-004) | |
| * @param model Optional model identifier (uses provided value or defaults to text-embedding-004) |
daniel-lxs
left a comment
There was a problem hiding this comment.
Thank you @Jopo-JP for the contribution!
I left a couple of suggestions worth taking a look at. Let me know if you have any questions!
…tion for embedding models
…tion for embedding models
…curate state management
|
Hi @daniel-lxs, Thank you for your valuable feedback! I've incorporated the changes you suggested.
The unrelated null-safety check has also been removed as requested. Let me know what you think of the new changes! |
Replaces the dimension slider with a text input for better precision, addressing reviewer feedback. Adds validation for the dimension range and corrects all related UI text and translations.
|
Hi @daniel-lxs, My original intention with the slider was to ensure users could only select a value within the valid range. However, I agree that a text input is more practical and consistent with the rest of the UI. I've now replaced the slider with a standard text input field. I've also added validation to display an error message if the entered dimension is outside the model's supported range, as you can see in the screenshot below. Translation in other langauge is missing for the new strings. At the moment, tha minDimension and maxDimension are displayed in the UI, as you can see in the screenshot. So the user knows the range.
|
|
Hey @Jopo-JP, thank you for addressing the review suggestions! I noticed some unrelated changes to Also, I saw a few missing translations. Let me know if you need help with those. Thank you! |
I removed it as i run github runners locally
@daniel-lxs Thanks for the response. Yeah, i changed the workflow so i can run it local as i use self-hosted runners. i reverte the file to the original state. Sorry for that. Regarding, translation, where are the translation from? Have a nice day! |
|
Hey @Jopo-JP I think is ready to go, can you resolve the conflicts? |
|
Hi @daniel-lxs, Have a nice evening. |
|
Hey @Jopo-JP I am unable to submit changes to your branch to help you create the missing translations |
Thanks for the response @daniel-lxs is there something need to be configured on my side? Nikolas |



Related GitHub Issue
Closes: #5621
Description
This PR introduces support for the new Gemini embedding model,
gemini-embedding-exp-03-07, and its flexible output dimensions.The key changes include:
embeddingModels.tsto include the new model.OpenAICompatibleEmbedderto accept and process adimensionparameter in API requests.GeminiEmbedderto pass themodelanddimensionoptions to the underlying embedder.webviewMessageHandler.tsto prevent potentialTypeErrorexceptions ifcodeIndexManageris not initialized.Test Procedure
GeminiEmbedderingemini.spec.tshave been updated to verify that themodelanddimensionparameters are correctly passed down.Pre-Submission Checklist
Documentation Updates
Additional Notes
This implementation provides the core backend support for variable embedding dimensions. The UI components and VS Code settings for users to select a dimension are not included in this PR and might be included in another PR.
The default dimension is currently hardcoded to 768.
Help to get the configuration site working is welcome.
Important
Introduces Gemini embedding model with flexible dimensions, updates
GeminiEmbedderandOpenAICompatibleEmbedderto handle dimensions, and adds null-safety check inwebviewMessageHandler.ts.gemini-embedding-exp-03-07model with flexible dimensions inembeddingModels.ts.GeminiEmbedderingemini.tsto handledimensionparameter and pass it toOpenAICompatibleEmbedder.codeIndexManagerinwebviewMessageHandler.ts.gemini.spec.tsto testmodelanddimensionparameters increateEmbeddings().IEmbedderinterface inembedder.tsto includedimensionoption increateEmbeddings().This description was created by
for 9e9ab05. You can customize this summary. It will automatically update as commits are pushed.