Skip to content
← Back to Changelog

Monday, June 17th 2024

Cohere Provider for the Vercel AI SDK now available

Posted by

Avatar for lgrammel

Lars Grammel

Software Engineer

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

pnpm install ai @ai-sdk/cohere

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

import { cohere } from '@ai-sdk/cohere';
import { generateText } from 'ai';
const { text } = await generateText({
model: cohere('command-r-plus'),
prompt: 'Write a vegetarian lasagna recipe for 4 people.',
});
Using the Cohere provider with the Vercel AI SDK

For more information, please see the documentation.

Post