@@ -20,6 +20,7 @@ export class CodeIndexConfigManager {
2020 private geminiOptions ?: { apiKey : string }
2121 private mistralOptions ?: { apiKey : string }
2222 private vercelAiGatewayOptions ?: { apiKey : string }
23+ private nebiusOptions ?: { apiKey : string }
2324 private qdrantUrl ?: string = "http://localhost:6333"
2425 private qdrantApiKey ?: string
2526 private searchMinScore ?: number
@@ -71,6 +72,7 @@ export class CodeIndexConfigManager {
7172 const geminiApiKey = this . contextProxy ?. getSecret ( "codebaseIndexGeminiApiKey" ) ?? ""
7273 const mistralApiKey = this . contextProxy ?. getSecret ( "codebaseIndexMistralApiKey" ) ?? ""
7374 const vercelAiGatewayApiKey = this . contextProxy ?. getSecret ( "codebaseIndexVercelAiGatewayApiKey" ) ?? ""
75+ const nebiusApiKey = this . contextProxy ?. getSecret ( "codebaseIndexNebiusApiKey" ) ?? ""
7476
7577 // Update instance variables with configuration
7678 this . codebaseIndexEnabled = codebaseIndexEnabled ?? true
@@ -108,6 +110,8 @@ export class CodeIndexConfigManager {
108110 this . embedderProvider = "mistral"
109111 } else if ( codebaseIndexEmbedderProvider === "vercel-ai-gateway" ) {
110112 this . embedderProvider = "vercel-ai-gateway"
113+ } else if ( codebaseIndexEmbedderProvider === "nebius" ) {
114+ this . embedderProvider = "nebius"
111115 } else {
112116 this . embedderProvider = "openai"
113117 }
@@ -129,6 +133,7 @@ export class CodeIndexConfigManager {
129133 this . geminiOptions = geminiApiKey ? { apiKey : geminiApiKey } : undefined
130134 this . mistralOptions = mistralApiKey ? { apiKey : mistralApiKey } : undefined
131135 this . vercelAiGatewayOptions = vercelAiGatewayApiKey ? { apiKey : vercelAiGatewayApiKey } : undefined
136+ this . nebiusOptions = nebiusApiKey ? { apiKey : nebiusApiKey } : undefined
132137 }
133138
134139 /**
@@ -147,6 +152,7 @@ export class CodeIndexConfigManager {
147152 geminiOptions ?: { apiKey : string }
148153 mistralOptions ?: { apiKey : string }
149154 vercelAiGatewayOptions ?: { apiKey : string }
155+ nebiusOptions ?: { apiKey : string }
150156 qdrantUrl ?: string
151157 qdrantApiKey ?: string
152158 searchMinScore ?: number
@@ -167,6 +173,7 @@ export class CodeIndexConfigManager {
167173 geminiApiKey : this . geminiOptions ?. apiKey ?? "" ,
168174 mistralApiKey : this . mistralOptions ?. apiKey ?? "" ,
169175 vercelAiGatewayApiKey : this . vercelAiGatewayOptions ?. apiKey ?? "" ,
176+ nebiusApiKey : this . nebiusOptions ?. apiKey ?? "" ,
170177 qdrantUrl : this . qdrantUrl ?? "" ,
171178 qdrantApiKey : this . qdrantApiKey ?? "" ,
172179 }
@@ -192,6 +199,7 @@ export class CodeIndexConfigManager {
192199 geminiOptions : this . geminiOptions ,
193200 mistralOptions : this . mistralOptions ,
194201 vercelAiGatewayOptions : this . vercelAiGatewayOptions ,
202+ nebiusOptions : this . nebiusOptions ,
195203 qdrantUrl : this . qdrantUrl ,
196204 qdrantApiKey : this . qdrantApiKey ,
197205 searchMinScore : this . currentSearchMinScore ,
@@ -234,6 +242,11 @@ export class CodeIndexConfigManager {
234242 const qdrantUrl = this . qdrantUrl
235243 const isConfigured = ! ! ( apiKey && qdrantUrl )
236244 return isConfigured
245+ } else if ( this . embedderProvider === "nebius" ) {
246+ const apiKey = this . nebiusOptions ?. apiKey
247+ const qdrantUrl = this . qdrantUrl
248+ const isConfigured = ! ! ( apiKey && qdrantUrl )
249+ return isConfigured
237250 }
238251 return false // Should not happen if embedderProvider is always set correctly
239252 }
@@ -269,6 +282,7 @@ export class CodeIndexConfigManager {
269282 const prevGeminiApiKey = prev ?. geminiApiKey ?? ""
270283 const prevMistralApiKey = prev ?. mistralApiKey ?? ""
271284 const prevVercelAiGatewayApiKey = prev ?. vercelAiGatewayApiKey ?? ""
285+ const prevNebiusApiKey = prev ?. nebiusApiKey ?? ""
272286 const prevQdrantUrl = prev ?. qdrantUrl ?? ""
273287 const prevQdrantApiKey = prev ?. qdrantApiKey ?? ""
274288
@@ -307,6 +321,7 @@ export class CodeIndexConfigManager {
307321 const currentGeminiApiKey = this . geminiOptions ?. apiKey ?? ""
308322 const currentMistralApiKey = this . mistralOptions ?. apiKey ?? ""
309323 const currentVercelAiGatewayApiKey = this . vercelAiGatewayOptions ?. apiKey ?? ""
324+ const currentNebiusApiKey = this . nebiusOptions ?. apiKey ?? ""
310325 const currentQdrantUrl = this . qdrantUrl ?? ""
311326 const currentQdrantApiKey = this . qdrantApiKey ?? ""
312327
@@ -337,6 +352,10 @@ export class CodeIndexConfigManager {
337352 return true
338353 }
339354
355+ if ( prevNebiusApiKey !== currentNebiusApiKey ) {
356+ return true
357+ }
358+
340359 // Check for model dimension changes (generic for all providers)
341360 if ( prevModelDimension !== currentModelDimension ) {
342361 return true
@@ -395,6 +414,7 @@ export class CodeIndexConfigManager {
395414 geminiOptions : this . geminiOptions ,
396415 mistralOptions : this . mistralOptions ,
397416 vercelAiGatewayOptions : this . vercelAiGatewayOptions ,
417+ nebiusOptions : this . nebiusOptions ,
398418 qdrantUrl : this . qdrantUrl ,
399419 qdrantApiKey : this . qdrantApiKey ,
400420 searchMinScore : this . currentSearchMinScore ,
0 commit comments