new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Providers · all subjects

registry & discovery

18 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Fish Audio provider in Vercel AI SDK

Fish Audio is a new provider available in the Vercel AI SDK as '@ai-sdk/fish-audio'. It supports speech and transcription models.

Official AI SDK providers list

The following are official AI SDK providers: xAI Grok (@ai-sdk/xai), OpenAI (@ai-sdk/openai), Azure OpenAI (@ai-sdk/azure), Anthropic (@ai-sdk/anthropic), Amazon Bedrock (@ai-sdk/amazon-bedrock), Google (@ai-sdk/google), Google Vertex (@ai-sdk/google-vertex), Mistral (@ai-sdk/mistral), Together.ai (@ai-sdk/togetherai), Cohere (@ai-sdk/cohere), Fireworks (@ai-sdk/fireworks), DeepInfra (@ai-sdk/deepinfra), DeepSeek (@ai-sdk/deepseek), Cerebras (@ai-sdk/cerebras), Groq (@ai-sdk/groq), Perplexity (@ai-sdk/perplexity), ElevenLabs (@ai-sdk/elevenlabs), LMNT (@ai-sdk/lmnt), Hume (@ai-sdk/hume), Rev.ai (@ai-sdk/revai), Deepgram (@ai-sdk/deepgram), Gladia (@ai-sdk/gladia), AssemblyAI (@ai-sdk/assemblyai), and Baseten (@ai-sdk/baseten).

OpenAI-compatible provider integration

AI SDK supports OpenAI-compatible providers including LM Studio and Heroku through the OpenAI Compatible provider.

Community-created providers for AI SDK

The open-source community has created the following providers: Ollama (ollama-ai-provider), FriendliAI (@friendliai/ai-provider), Portkey (@portkey-ai/vercel-provider), Cloudflare Workers AI (workers-ai-provider), OpenRouter (@openrouter/ai-sdk-provider), Apertis (@apertis/ai-sdk-provider), Aihubmix (@aihubmix/ai-sdk-provider), Requesty (@requesty/ai-sdk), Crosshatch (@crosshatch/ai-provider), Mixedbread (mixedbread-ai-provider), Voyage AI (voyage-ai-provider), Mem0 (@mem0/vercel-ai-provider), Letta (@letta-ai/vercel-ai-sdk-provider), Hindsight (@vectorize-io/hindsight-ai-sdk), Supermemory (@supermemory/tools), Spark (spark-ai-provider), AnthropicVertex (anthropic-vertex-ai), LangDB (@langdb/vercel-provider), Dify (dify-ai-provider), Sarvam (sarvam-ai-provider), Claude Code (ai-sdk-provider-claude-code), Browser AI (browser-ai), Gemini CLI (ai-sdk-provider-gemini-cli), A2A (a2a-ai-provider), SAP AI Core (@jerome-benoit/sap-ai-provider), AI/ML API (@ai-ml.api/aimlapi-vercel-ai), MCP Sampling (@mcpc-tech/mcp-sampling-ai-provider), ACP (@mcpc-tech/acp-ai-provider), OpenCode (ai-sdk-provider-opencode-sdk), Codex CLI (ai-sdk-provider-codex-cli), Soniox (@soniox/vercel-ai-sdk-provider), Zhipu (zhipu-ai-provider), OLLM (@ofoundation/ollm), ZeroEntropy (zeroentropy-ai-provider), Crusoe (crusoe-ai-provider), and Neon AI Gateway (@neon/ai-sdk-provider).

Self-hosted model providers

Self-hosted models can be accessed with the following providers: Ollama, LM Studio, Baseten, and Browser AI. Additionally, any self-hosted provider that supports the OpenAI specification can be used with the OpenAI Compatible Provider.

AI SDK provider categories: first-party, OpenAI-compatible, community

The AI SDK supports model providers through three categories: first-party providers, OpenAI-compatible providers, and community providers. Each category has separate documentation and setup paths.

createProviderRegistry parameter: providers

The providers parameter accepts Record<string, Provider> containing the unique identifier for each provider, which should be unique within the registry. Each Provider object has methods including: languageModel(id: string) => LanguageModel, embeddingModel(id: string) => EmbeddingModel<string>, imageModel(id: string) => ImageModel, transcriptionModel(id: string) => TranscriptionModel (optional), speechModel(id: string) => SpeechModel (optional), rerankingModel(id: string) => RerankingModel (optional), videoModel(id: string) => VideoModelV4 (optional), files() => FilesV4 (optional), and skills() => SkillsV4 (optional).

createProviderRegistry parameter: options

The options parameter is an optional object with the following properties: separator (string, optional, defaults to ':') for custom separator between provider and model IDs, languageModelMiddleware (LanguageModelMiddleware | LanguageModelMiddleware[], optional) to wrap all language models obtained from the registry, and imageModelMiddleware (ImageModelMiddleware | ImageModelMiddleware[], optional) to wrap all image models obtained from the registry.

createProviderRegistry return value methods

createProviderRegistry returns a Provider instance with the following methods: languageModel(id: string) => LanguageModel, embeddingModel(id: string) => EmbeddingModel<string>, imageModel(id: string) => ImageModel, transcriptionModel(id: string) => TranscriptionModel, speechModel(id: string) => SpeechModel, rerankingModel(id: string) => RerankingModel, videoModel(id: string) => VideoModelV4, files(providerId: string) => FilesV4, and skills(providerId: string) => SkillsV4. All methods accept ids in the format providerId:modelId.

createProviderRegistry TypeScript model ID inference

In TypeScript, registry model IDs are inferred from the registered provider IDs. When a provider exposes literal model ID types, editors can suggest the combined providerId:modelId values.

Provider registry setup with anthropic and openai

A provider registry can be created by importing { anthropic } from '@ai-sdk/anthropic', { createOpenAI } from '@ai-sdk/openai', and { createProviderRegistry } from 'ai'. Providers can be registered with a prefix using their default setup or with custom setup. Example: export const registry = createProviderRegistry({ anthropic, openai: createOpenAI({ apiKey: process.env.OPENAI_API_KEY }) });

How to access language models from registry

Language models can be accessed from a registry by calling the languageModel method with an id in the format providerId:modelId. Example: const { text } = await generateText({ model: registry.languageModel('openai:gpt-4.1'), prompt: 'Invent a new holiday and describe its traditions.' });

How to access embedding models from registry

Text embedding models can be accessed from a registry by calling the embeddingModel method with an id in the format providerId:modelId. Example: const { embedding } = await embed({ model: registry.embeddingModel('openai:text-embedding-3-small'), value: 'sunny day at the beach' });

How to access image models from registry

Image models can be accessed from a registry by calling the imageModel method with an id in the format providerId:modelId. Example: const { image } = await generateImage({ model: registry.imageModel('openai:dall-e-3'), prompt: 'A beautiful sunset over a calm ocean' });

How to access video models from registry

Video models can be accessed from a registry by calling the videoModel method with an id in the format providerId:modelId. Example: const { videos } = await experimental_generateVideo({ model: registry.videoModel('fal:luma-dream-machine/ray-2'), prompt: 'A cat walking on a beach at sunset' });

How to access provider files and skills from registry

A provider's files and skills interfaces can be accessed by calling registry.files(providerId) and registry.skills(providerId) respectively.

createProviderRegistry import statement

The createProviderRegistry function is imported from the 'ai' package using: import { createProviderRegistry } from 'ai'

createProviderRegistry function overview

createProviderRegistry allows you to create a registry with multiple providers that you can access by simple string IDs in the format providerId:modelId. You pass an object with provider instances or the gateway, each mapped to a provider ID prefix. When you work with multiple providers and models, it is often desirable to manage them in a central place and access the models through these simple string ids.

Give your agent this brain