Fix AWS token expiry issue when cached token expires when using AWS Profile for Bedrock (#2469) (#2530)

Fix AWS token expiry issue when cached token expires and using AWS Profile (#2469)
This commit is contained in:
vagadiya 2025-04-13 03:23:48 +01:00 committed by GitHub
parent 37cfd75ebf
commit 628d232f9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -169,6 +169,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH
// Use profile-based credentials if enabled and profile is set
clientConfig.credentials = fromIni({
profile: this.options.awsProfile,
ignoreCache: true,
})
} else if (this.options.awsAccessKey && this.options.awsSecretKey) {
// Use direct credentials if provided