-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(code-index): remove deprecated text-embedding-004 and migrate to gemini-embedding-001 #11038
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
base: main
Are you sure you want to change the base?
Conversation
…te to gemini-embedding-001 - Remove text-embedding-004 from EMBEDDING_MODEL_PROFILES - Add automatic migration in GeminiEmbedder for backward compatibility - Users with text-embedding-004 configured are silently migrated to gemini-embedding-001 - Update tests to reflect the changes
Review completed. All previously flagged issues have been resolved. The new test file provides good coverage for the backward compatibility fix.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| }, | ||
| gemini: { | ||
| "text-embedding-004": { dimension: 768 }, | ||
| "gemini-embedding-001": { dimension: 3072, scoreThreshold: 0.4 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing text-embedding-004 from the profiles breaks the silent migration for users who have it configured. When createVectorStore() in service-factory.ts calls getModelDimension("gemini", "text-embedding-004"), it will return undefined because the model is no longer in the profiles, causing an error. The migration in GeminiEmbedder only affects embedder creation, not dimension lookup.
Consider either: (1) keeping text-embedding-004 in the profiles pointing to the migrated model's dimension (3072), or (2) exporting the migration logic from GeminiEmbedder and applying it in service-factory.ts before calling getModelDimension().
Fix it with Roo Code or mention @roomote and request a fix.
Fixed the reported issue. All local checks passed. |
Review completed. The previously flagged issue remains unresolved.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
…patible dimension lookup
Added tests to verify the dimension lookup fix for deprecated |
…n embeddingModels Adds comprehensive tests for embeddingModels.ts to verify: - text-embedding-004 is present in gemini profiles for backward compatibility - getModelDimension returns 3072 for deprecated text-embedding-004 - Ensures createVectorStore works for users with text-embedding-004 configured
This PR removes the deprecated
text-embedding-004model and adds automatic migration togemini-embedding-001for backward compatibility.Changes
text-embedding-004entry has been removed fromEMBEDDING_MODEL_PROFILESinembeddingModels.tsDEPRECATED_MODEL_MIGRATIONSmap andmigrateModelId()method that silently convertstext-embedding-004togemini-embedding-001gemini.tsto reflect the supported model and migration behaviorWhy
The
text-embedding-004model is deprecated and should no longer be used. By adding automatic migration, users who havetext-embedding-004configured will continue to work without interruption - their requests are silently redirected togemini-embedding-001.Testing
View task on Roo Code Cloud
Important
Remove deprecated
text-embedding-004model and migrate togemini-embedding-001with backward compatibility inembeddingModels.tsandgemini.ts.text-embedding-004fromEMBEDDING_MODEL_PROFILESinembeddingModels.ts.DEPRECATED_MODEL_MIGRATIONSmap andmigrateModelId()inGeminiEmbedderto migratetext-embedding-004togemini-embedding-001.gemini.tsto reflect migration behavior.gemini.spec.tsto verify migration fromtext-embedding-004togemini-embedding-001.service-factory.spec.tsto test migration logic inGeminiEmbedder.embeddingModels.spec.tsto ensure backward compatibility for dimension lookups.text-embedding-004is retained inEMBEDDING_MODEL_PROFILESfor dimension lookup compatibility.This description was created by
for 04b4a69. You can customize this summary. It will automatically update as commits are pushed.