fix(tui): improve amazon-bedrock check to include container credentials (#13037)
This commit is contained in:
@@ -211,7 +211,12 @@ export namespace Provider {
|
|||||||
|
|
||||||
const awsWebIdentityTokenFile = Env.get("AWS_WEB_IDENTITY_TOKEN_FILE")
|
const awsWebIdentityTokenFile = Env.get("AWS_WEB_IDENTITY_TOKEN_FILE")
|
||||||
|
|
||||||
if (!profile && !awsAccessKeyId && !awsBearerToken && !awsWebIdentityTokenFile) return { autoload: false }
|
const containerCreds = Boolean(
|
||||||
|
process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI || process.env.AWS_CONTAINER_CREDENTIALS_FULL_URI,
|
||||||
|
)
|
||||||
|
|
||||||
|
if (!profile && !awsAccessKeyId && !awsBearerToken && !awsWebIdentityTokenFile && !containerCreds)
|
||||||
|
return { autoload: false }
|
||||||
|
|
||||||
const providerOptions: AmazonBedrockProviderSettings = {
|
const providerOptions: AmazonBedrockProviderSettings = {
|
||||||
region: defaultRegion,
|
region: defaultRegion,
|
||||||
|
|||||||
Reference in New Issue
Block a user