vercel avatar

Add Provider Package

vercel/aiOfficial

When you need to integrate a new AI provider into the Vercel AI SDK as an official @ai-sdk package, this walks you through the entire setup. It covers the layered architecture (specifications, utilities, providers, core), shows you how to structure your package directory, and explains the adapter pattern for implementing LanguageModelV4, EmbeddingModelV4, and other model types. The guide is thorough on the details that matter: using workspace dependencies, configuring both Node and Edge tests, handling API keys with loadApiKey, and the critical distinction between user-facing schemas (use .optional) and API response schemas (use .nullish). It also covers the less obvious stuff like running pnpm update-references after setup and why you shouldn't create a CHANGELOG.md file yourself.

skills.sh installs
1.4K
GitHub stars
27.8K
last updated
Aug 21, 2026

Install

$ npx -y skills add vercel/ai --skill add-provider-package --agent claude-code

Installs into .claude/skills of the current project.

Files

Add a Provider Package

Add a complete first-party @ai-sdk/<provider> package that follows the current provider interfaces, repository conventions, security requirements, and release process.

Read the Current Sources of Truth

Before implementing anything, read:

Use PR #18595 as a recent end-to-end example, but choose the current provider package whose API shape and model types most closely resemble the new provider as the implementation reference.

Third parties can publish provider packages outside this repository. A new first-party @ai-sdk/<provider> package requires prior discussion in an issue. Confirm that agreement exists before implementing the package.

Sponsors

Details

Repository
github.com/vercel/ai
Categories
Documentation, AI & Agent Building, Cloud & Infrastructure
First seen
Jun 3, 2026

More from vercel/ai

All 8
1ruvnet avatarsecurity-auditruvnet/rufloComprehensive security scanning and vulnerability detection. Includes input validation, path traversal prevention, CVE detection, and secure coding pattern enfo1.4Kskills.sh installs
2knowsuchagency avatarmcp2cliknowsuchagency/mcp2cliTurn any MCP server, OpenAPI spec, or GraphQL endpoint into a CLI. Use this skill when the user wants to interact with an MCP server, OpenAPI/REST API, or Graph1.4Kskills.sh installs
3itechmeat avatarreact-testing-libraryitechmeat/llm-codeReact Testing Library: user-centric component testing with queries, user-event simulation, async utilities, and accessibility-first API. Use when writing React 1.4Kskills.sh installs
4github avataremail-draftergithub/awesome-copilotDraft and review professional emails that match your personal writing style. Analyzes your sent emails for tone, greeting, structure, and sign-off patterns via 1.4Kskills.sh installs
5cap-go avatarsafe-area-handlingcap-go/capgo-skillsComplete guide to handling safe areas in Capacitor apps for iPhone notch, Dynamic Island, home indicator, and Android cutouts. Covers CSS, JavaScript, and nativ1.4Kskills.sh installs
6kostja94 avatargenerative-engine-optimizationkostja94/marketing-skillsWhen the user wants to optimize for AI search visibility (ChatGPT, Claude, Perplexity, AI Overviews). Also use when the user mentions "GEO," "AEO," "generative 1.4Kskills.sh installs