-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: correct Gemini embedding model dimensions #7349
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ import { TelemetryService } from "@roo-code/telemetry" | |
| * | ||
| * Supported models: | ||
| * - text-embedding-004 (dimension: 768) | ||
| * - gemini-embedding-001 (dimension: 2048) | ||
| * - gemini-embedding-001 (dimension: 768) | ||
|
||
| */ | ||
| export class GeminiEmbedder implements IEmbedder { | ||
| private readonly openAICompatibleEmbedder: OpenAICompatibleEmbedder | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,7 @@ export const EMBEDDING_MODEL_PROFILES: EmbeddingModelProfiles = { | |
| }, | ||
| gemini: { | ||
| "text-embedding-004": { dimension: 768 }, | ||
| "gemini-embedding-001": { dimension: 3072, scoreThreshold: 0.4 }, | ||
| "gemini-embedding-001": { dimension: 768, scoreThreshold: 0.4 }, | ||
|
||
| }, | ||
| mistral: { | ||
| "codestral-embed-2505": { dimension: 1536, 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.
These test changes assume 768 dimensions for gemini-embedding-001, but this appears to be incorrect based on the issue reporter's feedback. The tests were correctly expecting 3072 dimensions before.
Changing tests to match incorrect assumptions could mask the real issue and make it harder to detect problems in the future.