fix(ai): honor scoped AWS profile in Bedrock endpoint resolution

This commit is contained in:
Mario Zechner
2026-06-23 13:36:44 +02:00
parent 02540acd17
commit 5a8ea0bc81
@@ -127,7 +127,7 @@ export const stream: StreamFunction<"bedrock-converse-stream", BedrockOptions> =
profile: options.profile || getProviderEnvValue("AWS_PROFILE", options.env),
};
const configuredRegion = getConfiguredBedrockRegion(options);
const hasAmbientConfiguredProfile = Boolean(getProviderEnvValue("AWS_PROFILE"));
const hasAmbientConfiguredProfile = Boolean(getProviderEnvValue("AWS_PROFILE", options.env));
const endpointRegion = getStandardBedrockEndpointRegion(model.baseUrl);
const useExplicitEndpoint = shouldUseExplicitBedrockEndpoint(
model.baseUrl,