Skip to content
Closed
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
4 changes: 3 additions & 1 deletion packages/types/src/codebase-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const codebaseIndexConfigSchema = z.object({
codebaseIndexEnabled: z.boolean().optional(),
codebaseIndexQdrantUrl: z.string().optional(),
codebaseIndexEmbedderProvider: z
.enum(["openai", "ollama", "openai-compatible", "gemini", "mistral", "vercel-ai-gateway"])
.enum(["openai", "ollama", "openai-compatible", "gemini", "mistral", "vercel-ai-gateway", "nebius"])
.optional(),
codebaseIndexEmbedderBaseUrl: z.string().optional(),
codebaseIndexEmbedderModelId: z.string().optional(),
Expand Down Expand Up @@ -51,6 +51,7 @@ export const codebaseIndexModelsSchema = z.object({
gemini: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
mistral: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
"vercel-ai-gateway": z.record(z.string(), z.object({ dimension: z.number() })).optional(),
nebius: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
})

export type CodebaseIndexModels = z.infer<typeof codebaseIndexModelsSchema>
Expand All @@ -68,6 +69,7 @@ export const codebaseIndexProviderSchema = z.object({
codebaseIndexGeminiApiKey: z.string().optional(),
codebaseIndexMistralApiKey: z.string().optional(),
codebaseIndexVercelAiGatewayApiKey: z.string().optional(),
codebaseIndexNebiusApiKey: z.string().optional(),
})

export type CodebaseIndexProvider = z.infer<typeof codebaseIndexProviderSchema>
1 change: 1 addition & 0 deletions packages/types/src/global-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export const SECRET_STATE_KEYS = [
"codebaseIndexGeminiApiKey",
"codebaseIndexMistralApiKey",
"codebaseIndexVercelAiGatewayApiKey",
"codebaseIndexNebiusApiKey",
"huggingFaceApiKey",
"sambaNovaApiKey",
"zaiApiKey",
Expand Down
8 changes: 8 additions & 0 deletions src/core/webview/webviewMessageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2493,6 +2493,12 @@ export const webviewMessageHandler = async (
settings.codebaseIndexVercelAiGatewayApiKey,
)
}
if (settings.codebaseIndexNebiusApiKey !== undefined) {
await provider.contextProxy.storeSecret(
"codebaseIndexNebiusApiKey",
settings.codebaseIndexNebiusApiKey,
)
}

// Send success response first - settings are saved regardless of validation
await provider.postMessageToWebview({
Expand Down Expand Up @@ -2630,6 +2636,7 @@ export const webviewMessageHandler = async (
const hasVercelAiGatewayApiKey = !!(await provider.context.secrets.get(
"codebaseIndexVercelAiGatewayApiKey",
))
const hasNebiusApiKey = !!(await provider.context.secrets.get("codebaseIndexNebiusApiKey"))

provider.postMessageToWebview({
type: "codeIndexSecretStatus",
Expand All @@ -2640,6 +2647,7 @@ export const webviewMessageHandler = async (
hasGeminiApiKey,
hasMistralApiKey,
hasVercelAiGatewayApiKey,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical: Missing UI implementation - The PR adds backend support for Nebius but doesn't include the corresponding UI changes in webview-ui/src/components/chat/CodeIndexPopover.tsx. Users have no way to:

  1. Select "nebius" as a provider in the dropdown
  2. Enter their Nebius API key
  3. Select Nebius models
  4. See validation errors for Nebius configuration

The UI component needs to be updated to include:

  • "nebius" option in provider selection dropdown
  • Nebius-specific configuration section (similar to other providers)
  • Validation schema case for "nebius"
  • Secret handling for codebaseIndexNebiusApiKey
  • Translation keys for Nebius-specific labels and messages

hasNebiusApiKey,
},
})
break
Expand Down
5 changes: 5 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.

5 changes: 5 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.

5 changes: 5 additions & 0 deletions src/i18n/locales/en/embeddings.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,17 @@
"geminiConfigMissing": "Gemini configuration missing for embedder creation",
"mistralConfigMissing": "Mistral configuration missing for embedder creation",
"vercelAiGatewayConfigMissing": "Vercel AI Gateway configuration missing for embedder creation",
"nebiusConfigMissing": "Nebius 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.",
"qdrantUrlMissing": "Qdrant URL missing for vector store creation",
"codeIndexingNotConfigured": "Cannot create services: Code indexing is not properly configured"
},
"nebius": {
"rateLimitExceeded": "Nebius rate limit exceeded for {{type}} (limit: {{limit}} per {{window}}).",
"waitingForRateLimit": "Waiting for Nebius rate limit to reset (sleeping {{waitTimeMs}}ms)..."
},
"orchestrator": {
"indexingFailedNoBlocks": "Indexing failed: No code blocks were successfully indexed. This usually indicates an embedder configuration issue.",
"indexingFailedCritical": "Indexing failed: No code blocks were successfully indexed despite finding files to process. This indicates a critical embedder failure.",
Expand Down
5 changes: 5 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.

5 changes: 5 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.

5 changes: 5 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.

5 changes: 5 additions & 0 deletions src/i18n/locales/id/embeddings.json

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

5 changes: 5 additions & 0 deletions src/i18n/locales/it/embeddings.json

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

5 changes: 5 additions & 0 deletions src/i18n/locales/ja/embeddings.json

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

Loading