Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bedrock-sdk: Vercel edge runtime not supported #380

Open
florianjuengermann opened this issue Apr 6, 2024 · 4 comments
Open

Bedrock-sdk: Vercel edge runtime not supported #380

florianjuengermann opened this issue Apr 6, 2024 · 4 comments

Comments

@florianjuengermann
Copy link

When using the @anthropic-ai/bedrock-sdk in nextjs/vercel edge functions, it fails with

Attempted import error: 'fromNodeProviderChain' is not exported from '@aws-sdk/credential-providers' (imported as 'fromNodeProviderChain').

Import trace for requested module:
./node_modules/.pnpm/@[email protected][email protected]/node_modules/@anthropic-ai/bedrock-sdk/auth.mjs

According to the anthropic bedrock-sdk readme, Vercel edge functions are supported.

But in bedrock-sdk/src/auth.ts#L3 fromNodeProviderChain is imported from @aws-sdk/credential-providers which according to their readme, is "Not available in browsers & native apps" and therefore probably not available in the edge runtime.

Are there any trick to get it to run in the edge runtime?

@rattrayalex
Copy link
Collaborator

Thanks for raising this, we'll take a look soon.

@prajwalpkn
Copy link

Any updates on this?

@rattrayalex
Copy link
Collaborator

Sorry we let this slip. I actually think that with AWS's auth system, we won't be able to support bedrock on edge runtimes, but we'll take a look soon and let you know.

@domleboss97
Copy link

Given that this seems to be an issue on edge runtimes, it might be good to, at the very least, update the readme to reflect reality as it relates to supported environments. CF workers and vercel edge are both listed there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants