@@ -205,7 +205,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH
205205 constructor ( options : ProviderSettings ) {
206206 super ( )
207207 this . options = options
208- let region = this . options . awsRegion
208+ const region = this . options . awsRegion
209209
210210 // process the various user input options, be opinionated about the intent of the options
211211 // and determine the model to use during inference and for cost calculations
@@ -532,8 +532,11 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH
532532 //so that pricing, context window, caching etc have values that can be used
533533 //However, we want to keep the id of the model to be the ID for the router for
534534 //subsequent requests so they are sent back through the router
535- let invokedArnInfo = this . parseArn ( streamEvent . trace . promptRouter . invokedModelId )
536- let invokedModel = this . getModelById ( invokedArnInfo . modelId as string , invokedArnInfo . modelType )
535+ const invokedArnInfo = this . parseArn ( streamEvent . trace . promptRouter . invokedModelId )
536+ const invokedModel = this . getModelById (
537+ invokedArnInfo . modelId as string ,
538+ invokedArnInfo . modelType ,
539+ )
537540 if ( invokedModel ) {
538541 invokedModel . id = modelConfig . id
539542 this . costModelConfig = invokedModel
@@ -870,7 +873,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH
870873 }
871874
872875 // Get cache point placements
873- let strategy = new MultiPointStrategy ( config )
876+ const strategy = new MultiPointStrategy ( config )
874877 const cacheResult = strategy . determineOptimalCachePoints ( )
875878
876879 // Store cache point placements for future use if conversation ID is provided
@@ -934,7 +937,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH
934937 */
935938
936939 const arnRegex = / ^ a r n : [ ^ : ] + : (?: b e d r o c k | s a g e m a k e r ) : ( [ ^ : ] + ) : ( [ ^ : ] * ) : (?: ( [ ^ \/ ] + ) \/ ( [ \w \. \- : ] + ) | ( [ ^ \/ ] + ) ) $ /
937- let match = arn . match ( arnRegex )
940+ const match = arn . match ( arnRegex )
938941
939942 if ( match && match [ 1 ] && match [ 3 ] && match [ 4 ] ) {
940943 // Create the result object
@@ -961,7 +964,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH
961964 // Check if the original model ID had a region prefix
962965 if ( originalModelId && result . modelId !== originalModelId ) {
963966 // If the model ID changed after parsing, it had a region prefix
964- let prefix = originalModelId . replace ( result . modelId , "" )
967+ const prefix = originalModelId . replace ( result . modelId , "" )
965968 result . crossRegionInference = AwsBedrockHandler . isSystemInferenceProfile ( prefix )
966969 }
967970
0 commit comments