Providers and Models
Companies such as OpenAI and Anthropic (providers) offer access to a range of large language models (LLMs) with differing strengths and capabilities through their own APIs.
Each provider typically has its own unique method for interfacing with their models, complicating the process of switching providers and increasing the risk of vendor lock-in.
To solve these challenges, AI SDK Core offers a standardized approach to interacting with LLMs through a language model specification that abstracts differences between providers. This unified interface allows you to switch between providers with ease while using the same API for all providers.
Here is an overview of the AI SDK Provider Architecture:
AI SDK Providers
The AI SDK comes with several providers that you can use to interact with different language models:
- OpenAI Provider (
@ai-sdk/openai
) - Azure OpenAI Provider (
@ai-sdk/azure
) - Anthropic Provider (
@ai-sdk/anthropic
) - Amazon Bedrock Provider (
@ai-sdk/amazon-bedrock
) - Google Generative AI Provider (
@ai-sdk/google
) - Google Vertex Provider (
@ai-sdk/google-vertex
) - Mistral Provider (
@ai-sdk/mistral
) - xAI Grok Provider (
@ai-sdk/xai
) - Together.ai Provider (
@ai-sdk/togetherai
) - Cohere Provider (
@ai-sdk/cohere
) - Groq (
@ai-sdk/groq
)
You can also use the OpenAI provider with OpenAI-compatible APIs:
Our language model specification is published as an open-source package, which you can use to create custom providers.
The open-source community has created the following providers:
- Ollama Provider (
ollama-ai-provider
) - ChromeAI Provider (
chrome-ai
) - AnthropicVertex Provider (
anthropic-vertex-ai
) - FriendliAI Provider (
@friendliai/ai-provider
) - Portkey Provider (
@portkey-ai/vercel-provider
) - Cloudflare Workers AI Provider (
workers-ai-provider
) - Crosshatch Provider (
@crosshatch/ai-provider
) - Mixedbread Provider (
mixedbread-ai-provider
) - Voyage AI Provider (
voyage-ai-provider
) - LLamaCpp Provider (
llamacpp-ai-provider
)
Model Capabilities
The AI providers support different language models with various capabilities. Here are the capabilities of popular models:
Provider | Model | Image Input | Object Generation | Tool Usage | Tool Streaming |
---|---|---|---|---|---|
OpenAI | gpt-4o | ||||
OpenAI | gpt-4o-mini | ||||
OpenAI | gpt-4-turbo | ||||
OpenAI | gpt-4 | ||||
OpenAI | o1-preview | ||||
OpenAI | o1-mini | ||||
Anthropic | claude-3-5-sonnet-20241022 | ||||
Anthropic | claude-3-5-sonnet-20240620 | ||||
Anthropic | claude-3-5-haiku-20241022 | ||||
Mistral | pixtral-large-latest | ||||
Mistral | mistral-large-latest | ||||
Mistral | mistral-small-latest | ||||
Mistral | pixtral-12b-2409 | ||||
Google Generative AI | gemini-1.5-flash | ||||
Google Generative AI | gemini-1.5-pro | ||||
Google Vertex | gemini-1.5-flash | ||||
Google Vertex | gemini-1.5-pro | ||||
xAI Grok | grok-beta | ||||
xAI Grok | grok-vision-beta | ||||
Groq | llama-3.1-405b-reasoning | ||||
Groq | llama-3.1-70b-versatile | ||||
Groq | llama-3.1-8b-instant | ||||
Groq | mixtral-8x7b-32768 | ||||
Groq | gemma2-9b-it |
This table is not exhaustive. Additional models can be found in the provider documentation pages and on the provider websites.