Skip to content

feat: vercel model provider#689

Open
awsarron wants to merge 2 commits intostrands-agents:mainfrom
awsarron:feat-vercel-model-provider
Open

feat: vercel model provider#689
awsarron wants to merge 2 commits intostrands-agents:mainfrom
awsarron:feat-vercel-model-provider

Conversation

@awsarron
Copy link
Member

@awsarron awsarron commented Mar 20, 2026

Description

Adds a new VercelModel adapter that enables using any Vercel AI SDK Language Model v3 compatible provider with Strands Agents. This opens up the full ecosystem of Vercel AI SDK providers - Amazon Bedrock (@ai-sdk/amazon-bedrock), OpenAI (@ai-sdk/openai), Google (@ai-sdk/google), Anthropic (@ai-sdk/anthropic), and many more - as model backends for Strands agents.

The adapter translates between the Strands SDK message format and the Vercel LanguageModelV3 interface, supporting streaming responses, tool use, reasoning content, and multi-modal inputs (images, documents, video).

Usage:

import { Agent } from '@strands-agents/sdk'
import { VercelModel } from '@strands-agents/sdk/vercel'
import { bedrock } from '@ai-sdk/amazon-bedrock'

const agent = new Agent({
  model: new VercelModel(bedrock('us.anthropic.claude-sonnet-4-20250514-v1:0')),
})

@ai-sdk/provider is added as an optional peer dependency since it crosses the API boundary (users pass LanguageModelV3 instances to the constructor).

image

Related Issues

strands-agents/sdk-typescript#702
strands-agents/sdk-typescript#214
strands-agents/sdk-typescript#540

Type of Change

  • New content

Checklist

  • I have read the CONTRIBUTING document
  • My changes follow the project's documentation style
  • I have tested the documentation locally using npm run dev
  • Links in the documentation are valid and working

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

// Configuration example
async function configExample() {
// --8<-- [start:config_example]
const model = new VercelModel(openai('gpt-4o'), {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: This snippet uses openai without including the import statement. Users copying this code won't have the necessary import.

Suggestion: Add the imports inside the snippet markers:

// --8<-- [start:config_example]
import { Agent } from '@strands-agents/sdk'
import { VercelModel } from '@strands-agents/sdk/vercel'
import { openai } from '@ai-sdk/openai'

const model = new VercelModel(openai('gpt-4o'), {
  // ...

// Streaming example
async function streamingExample() {
// --8<-- [start:streaming]
const agent = new Agent({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: Same as above - this snippet uses openai without including the import statement.

Suggestion: Include imports inside the snippet so users can copy the complete example.

@github-actions
Copy link
Contributor

Assessment: Comment

Well-structured documentation for the Vercel AI SDK model provider integration. The content follows the project's documentation patterns and provides comprehensive coverage of installation, usage, configuration, and troubleshooting.

Review Summary
  • Completeness: The documentation covers all essential aspects including multiple provider examples, configuration options, streaming, and a helpful compatible providers table
  • Structure: Appropriate use of languages: TypeScript frontmatter for this TypeScript-only feature
  • Minor Issue: Two code snippets (config_example and streaming) are missing import statements, which would cause copy-paste errors for users

Nice work on the documentation - clear, well-organized, and comprehensive! 👍

@github-actions
Copy link
Contributor

Documentation Preview Ready

Your documentation preview has been successfully deployed!

Preview URL: https://d3ehv1nix5p99z.cloudfront.net/pr-cms-689/docs/user-guide/quickstart/overview/

Updated at: 2026-03-20T15:27:49.515Z

@awsarron
Copy link
Member Author

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

Successfully merging this pull request may close these issues.

2 participants