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
) - Cohere Provider (
@ai-sdk/cohere
)
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:
- LLamaCpp Provider (
nnance/llamacpp-ai-provider
) - Ollama Provider (
sgomez/ollama-ai-provider
) - ChromeAI Provider (
jeasonstudio/chrome-ai
) - Portkey Provider (
@portkey-ai/vercel-provider
) - AnthropicVertex Provider (
nalaso/anthropic-vertex-ai
)
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-20240620 | ||||
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 | ||||
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.