Skip to content

Commit 479c444

Browse files
OpeOginnischneiderlo
authored andcommitted
fix(tui): improve amazon-bedrock check to include container credentials (anomalyco#13037)
1 parent 0afcf29 commit 479c444

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/opencode/src/provider/provider.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,12 @@ export namespace Provider {
211211

212212
const awsWebIdentityTokenFile = Env.get("AWS_WEB_IDENTITY_TOKEN_FILE")
213213

214-
if (!profile && !awsAccessKeyId && !awsBearerToken && !awsWebIdentityTokenFile) return { autoload: false }
214+
const containerCreds = Boolean(
215+
process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI || process.env.AWS_CONTAINER_CREDENTIALS_FULL_URI,
216+
)
217+
218+
if (!profile && !awsAccessKeyId && !awsBearerToken && !awsWebIdentityTokenFile && !containerCreds)
219+
return { autoload: false }
215220

216221
const providerOptions: AmazonBedrockProviderSettings = {
217222
region: defaultRegion,

0 commit comments

Comments
 (0)