fix: support Bedrock API key login
This commit is contained in:
@@ -152,7 +152,10 @@ export const stream: StreamFunction<"bedrock-converse-stream", BedrockOptions> =
|
||||
// Resolve bearer token for Bedrock API key auth.
|
||||
const skipAuth = getProviderEnvValue("AWS_BEDROCK_SKIP_AUTH", options.env) === "1";
|
||||
const bearerToken =
|
||||
options.bearerToken || getProviderEnvValue("AWS_BEARER_TOKEN_BEDROCK", options.env) || undefined;
|
||||
options.bearerToken ||
|
||||
options.apiKey ||
|
||||
getProviderEnvValue("AWS_BEARER_TOKEN_BEDROCK", options.env) ||
|
||||
undefined;
|
||||
const useBearerToken = bearerToken !== undefined && !skipAuth;
|
||||
|
||||
// in Node.js/Bun environment only
|
||||
|
||||
Reference in New Issue
Block a user