Amazon Bedrock Provider for the Vercel AI SDK now available

The Vercel AI SDK now supports Bedrock through a new official provider. To use the provider, install the relevant package:

pnpm install ai @ai-sdk/amazon-bedrock

You can then use the provider with all AI SDK Core methods. For example, here's how you can use it with generateText:

import { bedrock } from '@ai-sdk/amazon-bedrock';
import { generateText } from 'ai';
const { text } = await generateText({
model: bedrock('meta.llama3-70b-instruct-v1:0'),
prompt: 'Write a vegetarian lasagna recipe for 4 people.',
});

Using the Amazon Bedrock provider with the Vercel AI SDK

For more information, please see the documentation.

Thanks Jon Spaeth for contributing this feature!