@@ -240,46 +240,7 @@ const ApiOptions = ({
240240 ) {
241241 vscode . postMessage ( { type : "requestRouterModels" } )
242242 } else if ( selectedProvider === "ibm-watsonx" ) {
243- const {
244- watsonxPlatform,
245- watsonxApiKey,
246- watsonxProjectId,
247- watsonxBaseUrl,
248- watsonxAuthType,
249- watsonxUsername,
250- watsonxPassword,
251- watsonxRegion,
252- } = apiConfiguration
253-
254- const ibmCloudReady =
255- watsonxPlatform === "ibmCloud" && ! ! watsonxApiKey && ! ! watsonxProjectId && ! ! watsonxRegion
256-
257- const cloudPakReady =
258- watsonxPlatform === "cloudPak" &&
259- ! ! watsonxBaseUrl &&
260- ! ! watsonxProjectId &&
261- ! ! watsonxUsername &&
262- ( ( watsonxAuthType === "apiKey" && ! ! watsonxApiKey ) ||
263- ( watsonxAuthType === "password" && ! ! watsonxPassword ) )
264-
265- if ( ibmCloudReady || cloudPakReady ) {
266- vscode . postMessage ( {
267- type : "requestWatsonxModels" ,
268- values : {
269- apiKey : apiConfiguration . watsonxApiKey ,
270- projectId : apiConfiguration . watsonxProjectId ,
271- platform : apiConfiguration . watsonxPlatform ,
272- baseUrl :
273- apiConfiguration . watsonxPlatform === "ibmCloud"
274- ? undefined
275- : apiConfiguration . watsonxBaseUrl ,
276- authType : apiConfiguration . watsonxAuthType ,
277- username : apiConfiguration . watsonxUsername ,
278- password : apiConfiguration . watsonxPassword ,
279- region : apiConfiguration . watsonxRegion ,
280- } ,
281- } )
282- }
243+ vscode . postMessage ( { type : "requestWatsonxModels" } )
283244 }
284245 } ,
285246 250 ,
@@ -294,14 +255,13 @@ const ApiOptions = ({
294255 apiConfiguration ?. litellmApiKey ,
295256 apiConfiguration ?. deepInfraApiKey ,
296257 apiConfiguration ?. deepInfraBaseUrl ,
297- apiConfiguration ?. watsonxPlatform ,
298- apiConfiguration ?. watsonxApiKey ,
299- apiConfiguration ?. watsonxProjectId ,
300- apiConfiguration ?. watsonxBaseUrl ,
301- apiConfiguration ?. watsonxAuthType ,
302- apiConfiguration ?. watsonxUsername ,
303- apiConfiguration ?. watsonxPassword ,
304- apiConfiguration ?. watsonxRegion ,
258+ apiConfiguration . watsonxPlatform ,
259+ apiConfiguration . watsonxApiKey ,
260+ apiConfiguration . watsonxProjectId ,
261+ apiConfiguration . watsonxBaseUrl ,
262+ apiConfiguration . watsonxAuthType ,
263+ apiConfiguration . watsonxUsername ,
264+ apiConfiguration . watsonxPassword ,
305265 customHeaders ,
306266 ] ,
307267 )
0 commit comments