Skip to content

Commit 3738fc3

Browse files
committed
add missing type for gemini
1 parent 8137b6d commit 3738fc3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/types/src/codebase-index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ import { z } from "zod"
77
export const codebaseIndexConfigSchema = z.object({
88
codebaseIndexEnabled: z.boolean().optional(),
99
codebaseIndexQdrantUrl: z.string().optional(),
10-
codebaseIndexEmbedderProvider: z.enum(["openai", "ollama"]).optional(),
10+
codebaseIndexEmbedderProvider: z.enum(["openai", "ollama", "gemini"]).optional(),
1111
codebaseIndexEmbedderBaseUrl: z.string().optional(),
1212
codebaseIndexEmbedderModelId: z.string().optional(),
13+
geminiEmbeddingTaskType: z.string().optional(),
1314
})
1415

1516
export type CodebaseIndexConfig = z.infer<typeof codebaseIndexConfigSchema>
@@ -21,6 +22,7 @@ export type CodebaseIndexConfig = z.infer<typeof codebaseIndexConfigSchema>
2122
export const codebaseIndexModelsSchema = z.object({
2223
openai: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
2324
ollama: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
25+
gemini: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
2426
})
2527

2628
export type CodebaseIndexModels = z.infer<typeof codebaseIndexModelsSchema>

packages/types/src/provider-settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ const lmStudioSchema = baseProviderSettingsSchema.extend({
151151
const geminiSchema = apiModelIdProviderModelSchema.extend({
152152
geminiApiKey: z.string().optional(),
153153
googleGeminiBaseUrl: z.string().optional(),
154+
geminiEmbeddingTaskType: z.string().optional(),
154155
})
155156

156157
const openAiNativeSchema = apiModelIdProviderModelSchema.extend({
@@ -316,6 +317,7 @@ export const PROVIDER_SETTINGS_KEYS = keysOf<ProviderSettings>()([
316317
// Gemini
317318
"geminiApiKey",
318319
"googleGeminiBaseUrl",
320+
"geminiEmbeddingTaskType",
319321
// OpenAI Native
320322
"openAiNativeApiKey",
321323
"openAiNativeBaseUrl",

0 commit comments

Comments
 (0)