Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/flat-eels-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": minor
---

Added Voyage AI embedder support
3 changes: 3 additions & 0 deletions packages/types/src/codebase-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const codebaseIndexConfigSchema = z.object({
"vercel-ai-gateway",
"bedrock",
"openrouter",
"voyage", // kilocode_change
])
.optional(),
// kilocode_change start
Expand Down Expand Up @@ -93,6 +94,7 @@ export const codebaseIndexModelsSchema = z.object({
"vercel-ai-gateway": z.record(z.string(), z.object({ dimension: z.number() })).optional(),
openrouter: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
bedrock: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
voyage: z.record(z.string(), z.object({ dimension: z.number() })).optional(), // kilocode_change
})

export type CodebaseIndexModels = z.infer<typeof codebaseIndexModelsSchema>
Expand All @@ -111,6 +113,7 @@ export const codebaseIndexProviderSchema = z.object({
codebaseIndexMistralApiKey: z.string().optional(),
codebaseIndexVercelAiGatewayApiKey: z.string().optional(),
codebaseIndexOpenRouterApiKey: z.string().optional(),
codebaseIndexVoyageApiKey: z.string().optional(), // kilocode_change
})

export type CodebaseIndexProvider = z.infer<typeof codebaseIndexProviderSchema>
3 changes: 2 additions & 1 deletion packages/types/src/embedding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export type EmbedderProvider =
| "mistral"
| "vercel-ai-gateway"
| "bedrock"
| "openrouter" // Add other providers as needed.
| "openrouter"
| "voyage" // kilocode_change // Add other providers as needed.

export interface EmbeddingModelProfile {
dimension: number
Expand Down
7 changes: 6 additions & 1 deletion packages/types/src/global-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ import { telemetrySettingsSchema } from "./telemetry.js"
import { modeConfigSchema } from "./mode.js"
import { customModePromptsSchema, customSupportPromptsSchema } from "./mode.js"
import { languagesSchema } from "./vscode.js"
import { fastApplyModelSchema, autocompleteServiceSettingsSchema, fastApplyApiProviderSchema } from "./kilocode/kilocode.js"
import {
fastApplyModelSchema,
autocompleteServiceSettingsSchema,
fastApplyApiProviderSchema,
} from "./kilocode/kilocode.js"

/**
* Default delay in milliseconds after writes to allow diagnostics to detect potential problems.
Expand Down Expand Up @@ -310,6 +314,7 @@ export const SECRET_STATE_KEYS = [
"vercelAiGatewayApiKey",
"sapAiCoreServiceKey", // kilocode_change
"basetenApiKey",
"codebaseIndexVoyageApiKey", // kilocode_change
"corethinkApiKey",
] as const

Expand Down
2 changes: 2 additions & 0 deletions packages/types/src/vscode-extension-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,7 @@ export interface WebviewMessage {
| "vercel-ai-gateway"
| "bedrock"
| "openrouter"
| "voyage" // kilocode_change
codebaseIndexVectorStoreProvider?: "lancedb" | "qdrant" // kilocode_change
codebaseIndexLancedbVectorStoreDirectory?: string // kilocode_change
codebaseIndexEmbedderBaseUrl?: string
Expand All @@ -1083,6 +1084,7 @@ export interface WebviewMessage {
codebaseIndexMistralApiKey?: string
codebaseIndexVercelAiGatewayApiKey?: string
codebaseIndexOpenRouterApiKey?: string
codebaseIndexVoyageApiKey?: string // kilocode_change
}
updatedSettings?: RooCodeSettings
// kilocode_change start: Review mode
Expand Down
10 changes: 10 additions & 0 deletions src/core/webview/webviewMessageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3410,6 +3410,14 @@ export const webviewMessageHandler = async (
settings.codebaseIndexOpenRouterApiKey,
)
}
// kilocode_change start
if (settings.codebaseIndexVoyageApiKey !== undefined) {
await provider.contextProxy.storeSecret(
"codebaseIndexVoyageApiKey",
settings.codebaseIndexVoyageApiKey,
)
}
// kilocode_change end

// Send success response first - settings are saved regardless of validation
await provider.postMessageToWebview({
Expand Down Expand Up @@ -3548,6 +3556,7 @@ export const webviewMessageHandler = async (
"codebaseIndexVercelAiGatewayApiKey",
))
const hasOpenRouterApiKey = !!(await provider.context.secrets.get("codebaseIndexOpenRouterApiKey"))
const hasVoyageApiKey = !!(await provider.context.secrets.get("codebaseIndexVoyageApiKey")) // kilocode_change

provider.postMessageToWebview({
type: "codeIndexSecretStatus",
Expand All @@ -3559,6 +3568,7 @@ export const webviewMessageHandler = async (
hasMistralApiKey,
hasVercelAiGatewayApiKey,
hasOpenRouterApiKey,
hasVoyageApiKey, // kilocode_change
},
})
break
Expand Down
7 changes: 7 additions & 0 deletions src/i18n/locales/ar/embeddings.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/i18n/locales/ca/embeddings.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/i18n/locales/cs/embeddings.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/i18n/locales/de/embeddings.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/i18n/locales/en/embeddings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
"accessDenied": "Access denied to Amazon Bedrock service. Please check your IAM permissions.",
"modelNotFound": "Model {{model}} not found in Amazon Bedrock"
},
"voyage": {
"invalidResponseFormat": "Invalid response format from Voyage AI",
"invalidCredentials": "Invalid Voyage AI API key. Please check your API key configuration.",
"accessDenied": "Access denied. Your IP address may be blocked by Voyage AI. Try a different network.",
"modelNotFound": "Model {{model}} not found in Voyage AI. Please check your model selection."
},
"scanner": {
"unknownErrorProcessingFile": "Unknown error processing file {{filePath}}",
"unknownErrorDeletingPoints": "Unknown error deleting points for {{filePath}}",
Expand Down Expand Up @@ -58,6 +64,7 @@
"openRouterConfigMissing": "OpenRouter configuration missing for embedder creation",
"vercelAiGatewayConfigMissing": "Vercel AI Gateway configuration missing for embedder creation",
"bedrockConfigMissing": "Amazon Bedrock configuration missing for embedder creation",
"voyageConfigMissing": "Voyage AI configuration missing for embedder creation",
"invalidEmbedderType": "Invalid embedder type configured: {{embedderProvider}}",
"vectorDimensionNotDeterminedOpenAiCompatible": "Could not determine vector dimension for model '{{modelId}}' with provider '{{provider}}'. Please ensure the 'Embedding Dimension' is correctly set in the OpenAI-Compatible provider settings.",
"vectorDimensionNotDetermined": "Could not determine vector dimension for model '{{modelId}}' with provider '{{provider}}'. Check model profiles or configuration.",
Expand Down
7 changes: 7 additions & 0 deletions src/i18n/locales/es/embeddings.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/i18n/locales/fr/embeddings.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/i18n/locales/hi/embeddings.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading