support api key authentication for Bedrock API#8472
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
|
Is there any way to provide the API key without an environment variable? For example, similar to defining |
+1, would be great to decide on runtime what key to use rather than via env var |
|
Danny Avila (@danny-avila) Hassieb Pakzad (@hassiebp) good callout! Opened an issue to track here: #8532 (would love a PR to add support if you're up for it!) |
|
Danny Avila (@danny-avila) Hassieb Pakzad (@hassiebp) actually there is one way with bedrock-runtime-client JS SDK only. you can create a client with token parameter, set authSchemePreference, and use it to call InvokeModel API without an environment variable. |
|
Thanks 0x-fang! It wasn't immediately clear what the In any case, we need a release for |
|
Hi Danny Avila (@danny-avila) the above approach only works with We had raised a PR to bump up the boto3 version in |
|
Danny Avila (@danny-avila) we missed the release step, apologies! Just pushed out 0.1.12 off of main. For the issue that got added to address an api key param, would people prefer initializing as 0x-fang described or through an implicit |
AWS Bedrock has introduced API key support on 7/7, simplifying authentication for the Amazon Bedrock API. To enable this new feature in langchainjs, this update bumps the required "@aws-sdk/client-bedrock-runtime" version to "^3.840.0". It has been tested and worked as expected with new
AWS_BEARER_TOKEN_BEDROCKenvironment variable.