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

Problems upgrading from Bedrock v1 to v2 #4996

Open
elie222 opened this issue Feb 26, 2025 · 1 comment
Open

Problems upgrading from Bedrock v1 to v2 #4996

elie222 opened this issue Feb 26, 2025 · 1 comment
Labels
ai/provider bug Something isn't working

Comments

@elie222
Copy link

elie222 commented Feb 26, 2025

Description

Same credentials used with Bedrock provider work in v1, but not in v2.

The problem may be related to this note, but I couldn't find a variation that worked:
https://sdk.vercel.ai/providers/ai-sdk-providers/amazon-bedrock#migrating-to-ai-sdkamazon-bedrock-2x

I tried setting sessionToken to undefined explicitly too.

Code example

v1:

      llmModel: createAmazonBedrock({
        bedrockOptions: {
          region: env.BEDROCK_REGION,
          credentials: {
            accessKeyId: env.BEDROCK_ACCESS_KEY,
            secretAccessKey: env.BEDROCK_SECRET_KEY,
          },
        },
      })(model),

v2:

    llmModel: createAmazonBedrock({
        region: env.BEDROCK_REGION,
        accessKeyId: env.BEDROCK_ACCESS_KEY,
        secretAccessKey: env.BEDROCK_SECRET_KEY,
      })(model),

elie222/inbox-zero@18ffdad

AI provider

@ai-sdk/amazon-bedrock v2.0.5

Additional context

No response

@elie222 elie222 added the bug Something isn't working label Feb 26, 2025
@shaper
Copy link
Contributor

shaper commented Feb 27, 2025

Hi, if you add sessionToken: undefined does it work?

See also this note: https://sdk.vercel.ai/providers/ai-sdk-providers/amazon-bedrock#migrating-to-ai-sdkamazon-bedrock-2x and also mentioned in a note here: https://sdk.vercel.ai/providers/ai-sdk-providers/amazon-bedrock#provider-instance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/provider bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants