Skip to content

feat (providers/vercel): initial vercel provider #6464

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

Merged
merged 9 commits into from
May 27, 2025
Merged

Conversation

shaper
Copy link
Contributor

@shaper shaper commented May 23, 2025

Background

Port of #6419

Vercel is adding an API for the v0 model per https://vercel.com/docs/v0/api and an AI SDK provider would make it easier for developers to interact with it.

Summary

Added an initial provider for the Vercel API.

Verification

Added examples across several features and executed end to end manually.

Tasks

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • Formatting issues have been fixed (run pnpm prettier-fix in the project root)

@shaper shaper changed the title feat (vercel): initial vercel provider feat (providers/vercel): initial vercel provider May 23, 2025
@@ -100,6 +100,9 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build packages
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without this, the type-check fails as the @ai-sdk/vercel package hasn't been built. I'm not sure why this package is the first to trigger this failure. It seems logical that we would need the packages built for the type-check to succeed. Perhaps the existing packages are/were cached by some other build or action, and we've been getting lucky?

Copy link
Collaborator

Choose a reason for hiding this comment

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

the type check does not need pkgs to be built afaik

@shaper shaper marked this pull request as ready for review May 23, 2025 20:51
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both of the image example scripts fail with a v0-side server error on the v5 branch, but they work on ToT. Are there known image attachment issues, else I'll debug further with @ctate

@@ -0,0 +1,66 @@
{
"name": "@ai-sdk/vercel",
"version": "0.0.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

1.0.0-alpha.4

files under /.changeset might also need updates, and there are other link files (search for how other provider pkgs are referenced)

@lgrammel lgrammel merged commit 9eb5417 into v5 May 27, 2025
8 checks passed
@lgrammel lgrammel deleted the shaper/pr/vercel-v5 branch May 27, 2025 07:42
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