@@ -177,12 +177,16 @@ function resolveBaseModelId(profile: InferenceProfileSummary): string | undefine
177177 const firstArn = profile . models ?. [ 0 ] ?. modelArn ;
178178 if ( firstArn ) {
179179 const arnMatch = / f o u n d a t i o n - m o d e l \/ ( .+ ) $ / . exec ( firstArn ) ;
180- if ( arnMatch ) return arnMatch [ 1 ] ;
180+ if ( arnMatch ) {
181+ return arnMatch [ 1 ] ;
182+ }
181183 }
182184 if ( profile . type === "SYSTEM_DEFINED" ) {
183185 const id = profile . inferenceProfileId ?? "" ;
184186 const prefixMatch = / ^ (?: u s | e u | a p | j p | g l o b a l ) \. ( .+ ) $ / i. exec ( id ) ;
185- if ( prefixMatch ) return prefixMatch [ 1 ] ;
187+ if ( prefixMatch ) {
188+ return prefixMatch [ 1 ] ;
189+ }
186190 }
187191 return undefined ;
188192}
@@ -236,8 +240,12 @@ function resolveInferenceProfiles(
236240) : ModelDefinitionConfig [ ] {
237241 const discovered : ModelDefinitionConfig [ ] = [ ] ;
238242 for ( const profile of profiles ) {
239- if ( ! profile . inferenceProfileId ?. trim ( ) ) continue ;
240- if ( profile . status !== "ACTIVE" ) continue ;
243+ if ( ! profile . inferenceProfileId ?. trim ( ) ) {
244+ continue ;
245+ }
246+ if ( profile . status !== "ACTIVE" ) {
247+ continue ;
248+ }
241249
242250 // Apply provider filter: check if any of the underlying models match.
243251 if ( providerFilter . length > 0 ) {
@@ -246,7 +254,9 @@ function resolveInferenceProfiles(
246254 const provider = m . modelArn ?. split ( "/" ) ?. [ 1 ] ?. split ( "." ) ?. [ 0 ] ;
247255 return provider ? providerFilter . includes ( provider . toLowerCase ( ) ) : false ;
248256 } ) ;
249- if ( ! matchesFilter ) continue ;
257+ if ( ! matchesFilter ) {
258+ continue ;
259+ }
250260 }
251261
252262 // Look up the underlying foundation model to inherit its capabilities.
@@ -366,7 +376,9 @@ export async function discoverBedrockModels(params: {
366376 return discovered . toSorted ( ( a , b ) => {
367377 const aGlobal = a . id . startsWith ( "global." ) ? 0 : 1 ;
368378 const bGlobal = b . id . startsWith ( "global." ) ? 0 : 1 ;
369- if ( aGlobal !== bGlobal ) return aGlobal - bGlobal ;
379+ if ( aGlobal !== bGlobal ) {
380+ return aGlobal - bGlobal ;
381+ }
370382 return a . name . localeCompare ( b . name ) ;
371383 } ) ;
372384 } ) ( ) ;
@@ -409,8 +421,8 @@ export async function resolveImplicitBedrockProvider(params: {
409421} ) : Promise < ModelProviderConfig | null > {
410422 const env = params . env ?? process . env ;
411423 const discoveryConfig = {
412- ...( params . config ?. models ?. bedrockDiscovery ?? { } ) ,
413- ...( params . pluginConfig ?. discovery ?? { } ) ,
424+ ...params . config ?. models ?. bedrockDiscovery ,
425+ ...params . pluginConfig ?. discovery ,
414426 } ;
415427 const enabled = discoveryConfig ?. enabled ;
416428 const hasAwsCreds = resolveAwsSdkEnvVarName ( env ) !== undefined ;
0 commit comments