Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Next.js example that uses the Vercel AI SDK provider registry to switch between OpenAI, Anthropic, and Google models in one chat app.

Next.js example that connects Hypertune feature flags and A/B testing to Vercel Global Config, the Flags SDK and the Vercel Toolbar.

JavaScript example showing how to add Upstash Redis caching to a Nuxt app deployed on Vercel.

A minimal Preact boilerplate from the Vercel examples collection that deploys to Vercel with zero configuration.

A TypeScript Next.js starter app wired to the Makeswift visual builder so you can edit Next.js pages in a drag-and-drop editor.
Provider Registry with Vercel AI SDK is a Next.js starter from Vercel Labs that registers several AI model providers through the AI SDK's experimental_createProviderRegistry function, letting a single chat interface switch between OpenAI, Anthropic, and Google Generative AI models.
It is an example application published under the vercel-labs GitHub organization that combines Next.js with the Vercel AI SDK to demonstrate multi-provider model selection. The app takes a user prompt plus the currently selected provider and model as input, and returns a streamed text response generated by the chosen provider. Configuration is driven by three environment variables — OPENAI_API_KEY, ANTHROPIC_API_KEY, and GOOGLE_GENERATIVE_AI_API_KEY — so all three vendors can be registered and swapped at runtime from the same codebase.
experimental_createProviderRegistry maps provider identifiers to model instances so one lookup resolves the active model instead of hardcoding a single SDK client..env.example.create-next-app, using the same scaffolding command developers already know.streamText function streams tokens back to the UI rather than returning one blocking response.vercel-labs/ai-sdk-preview-provider-registry repository and prompts for the three API keys during setup..env file using the variables shown in .env.example.npm install, then npm run dev to start the development server.The example code is a free, open-source Vercel Labs repository you can clone and modify. You still pay each AI provider for the tokens your app consumes, and you supply your own API keys.
Out of the box the environment template covers OpenAI, Anthropic, and Google Generative AI. Because models are resolved through the provider registry, adding another AI SDK-compatible provider means registering it in the same place.
Yes. At least one provider key is required, and the deployment flow asks for all three — OPENAI_API_KEY, ANTHROPIC_API_KEY, and GOOGLE_GENERATIVE_AI_API_KEY — so any model you select in the UI has credentials available.
Run npx create-next-app --example with the vercel-labs/ai-sdk-preview-provider-registry repository URL, or use the equivalent Yarn and pnpm create next-app commands documented in the README.
