@@ -73,6 +73,7 @@ interface LocalCodeIndexSettings {
7373 codebaseIndexGeminiApiKey ?: string
7474 codebaseIndexMistralApiKey ?: string
7575 codebaseIndexVercelAiGatewayApiKey ?: string
76+ codebaseIndexNebiusApiKey ?: string
7677}
7778
7879// Validation schema for codebase index settings
@@ -149,6 +150,14 @@ const createValidationSchema = (provider: EmbedderProvider, t: any) => {
149150 . min ( 1 , t ( "settings:codeIndex.validation.modelSelectionRequired" ) ) ,
150151 } )
151152
153+ case "nebius" :
154+ return baseSchema . extend ( {
155+ codebaseIndexNebiusApiKey : z . string ( ) . min ( 1 , t ( "settings:codeIndex.validation.apiKeyRequired" ) ) ,
156+ codebaseIndexEmbedderModelId : z
157+ . string ( )
158+ . min ( 1 , t ( "settings:codeIndex.validation.modelSelectionRequired" ) ) ,
159+ } )
160+
152161 default :
153162 return baseSchema
154163 }
@@ -194,6 +203,7 @@ export const CodeIndexPopover: React.FC<CodeIndexPopoverProps> = ({
194203 codebaseIndexGeminiApiKey : "" ,
195204 codebaseIndexMistralApiKey : "" ,
196205 codebaseIndexVercelAiGatewayApiKey : "" ,
206+ codebaseIndexNebiusApiKey : "" ,
197207 } )
198208
199209 // Initial settings state - stores the settings when popover opens
@@ -229,6 +239,7 @@ export const CodeIndexPopover: React.FC<CodeIndexPopoverProps> = ({
229239 codebaseIndexGeminiApiKey : "" ,
230240 codebaseIndexMistralApiKey : "" ,
231241 codebaseIndexVercelAiGatewayApiKey : "" ,
242+ codebaseIndexNebiusApiKey : "" ,
232243 }
233244 setInitialSettings ( settings )
234245 setCurrentSettings ( settings )
@@ -345,6 +356,9 @@ export const CodeIndexPopover: React.FC<CodeIndexPopoverProps> = ({
345356 ? SECRET_PLACEHOLDER
346357 : ""
347358 }
359+ if ( ! prev . codebaseIndexNebiusApiKey || prev . codebaseIndexNebiusApiKey === SECRET_PLACEHOLDER ) {
360+ updated . codebaseIndexNebiusApiKey = secretStatus . hasNebiusApiKey ? SECRET_PLACEHOLDER : ""
361+ }
348362
349363 return updated
350364 }
@@ -418,7 +432,8 @@ export const CodeIndexPopover: React.FC<CodeIndexPopoverProps> = ({
418432 key === "codebaseIndexOpenAiCompatibleApiKey" ||
419433 key === "codebaseIndexGeminiApiKey" ||
420434 key === "codebaseIndexMistralApiKey" ||
421- key === "codebaseIndexVercelAiGatewayApiKey"
435+ key === "codebaseIndexVercelAiGatewayApiKey" ||
436+ key === "codebaseIndexNebiusApiKey"
422437 ) {
423438 dataToValidate [ key ] = "placeholder-valid"
424439 }
@@ -669,6 +684,9 @@ export const CodeIndexPopover: React.FC<CodeIndexPopoverProps> = ({
669684 < SelectItem value = "vercel-ai-gateway" >
670685 { t ( "settings:codeIndex.vercelAiGatewayProvider" ) }
671686 </ SelectItem >
687+ < SelectItem value = "nebius" >
688+ { t ( "settings:codeIndex.nebiusProvider" ) }
689+ </ SelectItem >
672690 </ SelectContent >
673691 </ Select >
674692 </ div >
@@ -1131,6 +1149,71 @@ export const CodeIndexPopover: React.FC<CodeIndexPopoverProps> = ({
11311149 </ >
11321150 ) }
11331151
1152+ { currentSettings . codebaseIndexEmbedderProvider === "nebius" && (
1153+ < >
1154+ < div className = "space-y-2" >
1155+ < label className = "text-sm font-medium" >
1156+ { t ( "settings:codeIndex.nebiusApiKeyLabel" ) }
1157+ </ label >
1158+ < VSCodeTextField
1159+ type = "password"
1160+ value = { currentSettings . codebaseIndexNebiusApiKey || "" }
1161+ onInput = { ( e : any ) =>
1162+ updateSetting ( "codebaseIndexNebiusApiKey" , e . target . value )
1163+ }
1164+ placeholder = { t ( "settings:codeIndex.nebiusApiKeyPlaceholder" ) }
1165+ className = { cn ( "w-full" , {
1166+ "border-red-500" : formErrors . codebaseIndexNebiusApiKey ,
1167+ } ) }
1168+ />
1169+ { formErrors . codebaseIndexNebiusApiKey && (
1170+ < p className = "text-xs text-vscode-errorForeground mt-1 mb-0" >
1171+ { formErrors . codebaseIndexNebiusApiKey }
1172+ </ p >
1173+ ) }
1174+ </ div >
1175+
1176+ < div className = "space-y-2" >
1177+ < label className = "text-sm font-medium" >
1178+ { t ( "settings:codeIndex.modelLabel" ) }
1179+ </ label >
1180+ < VSCodeDropdown
1181+ value = { currentSettings . codebaseIndexEmbedderModelId }
1182+ onChange = { ( e : any ) =>
1183+ updateSetting ( "codebaseIndexEmbedderModelId" , e . target . value )
1184+ }
1185+ className = { cn ( "w-full" , {
1186+ "border-red-500" : formErrors . codebaseIndexEmbedderModelId ,
1187+ } ) } >
1188+ < VSCodeOption value = "" className = "p-2" >
1189+ { t ( "settings:codeIndex.selectModel" ) }
1190+ </ VSCodeOption >
1191+ { getAvailableModels ( ) . map ( ( modelId ) => {
1192+ const model =
1193+ codebaseIndexModels ?. [
1194+ currentSettings . codebaseIndexEmbedderProvider
1195+ ] ?. [ modelId ]
1196+ return (
1197+ < VSCodeOption key = { modelId } value = { modelId } className = "p-2" >
1198+ { modelId } { " " }
1199+ { model
1200+ ? t ( "settings:codeIndex.modelDimensions" , {
1201+ dimension : model . dimension ,
1202+ } )
1203+ : "" }
1204+ </ VSCodeOption >
1205+ )
1206+ } ) }
1207+ </ VSCodeDropdown >
1208+ { formErrors . codebaseIndexEmbedderModelId && (
1209+ < p className = "text-xs text-vscode-errorForeground mt-1 mb-0" >
1210+ { formErrors . codebaseIndexEmbedderModelId }
1211+ </ p >
1212+ ) }
1213+ </ div >
1214+ </ >
1215+ ) }
1216+
11341217 { /* Qdrant Settings */ }
11351218 < div className = "space-y-2" >
11361219 < label className = "text-sm font-medium" >
0 commit comments