Compatibility

Every provider, what it supports, and the models the library special-cases.

One table to answer "can I do X on Y", from what each pack actually implements.

Language models

ProviderToolsStructured outputReasoningVisionSourcesCached tokens
OpenAI (Responses)
OpenAI (chat)
Azure OpenAI
Anthropic
Google / Vertex
Bedrock
xAI
Groq✓*✓*✓*
DeepSeek✓*✓*✓*
Mistral✓*✓*✓*
Perplexity✓*✓*
Cohere
Foundation Models
OpenAI-compatible✓*✓*✓*✓*

* Rides the shared chat-completions wire; whether a given model honors it is up to the model. Perplexity has no tool calling upstream, so the library doesn't pretend otherwise.

Column notes. Structured output uses each provider's best native mechanism: JSON schema mode on the OpenAI wire, constrained decoding on Gemini, a forced tool call on Anthropic, guided generation on-device. Sources means citations surface as StreamPart.source (OpenAI url annotations, xAI live search, Perplexity and Cohere citations). Cached tokens means usage.cachedInputTokens is populated on prompt-cache hits.

Models the library special-cases

Model ids are free strings — anything the provider serves works. These are the ids the library treats specially, straight from the source:

OpenAI

  • The reasoning ruleset applies to o1*, o3*, o4-mini*, and gpt-5* except gpt-5-chat*.
  • gpt-5.1 through gpt-5.6 accept temperature/topP again when reasoning effort is none; other reasoning models drop them.

Anthropic

ModelsOutput ceilingReasoning translation
Sonnet 5, Fable 5, Opus 4.7 / 4.8128kAdaptive thinking, effort up to xhigh
Sonnet 4.6, Opus 4.6128kAdaptive thinking (xhigh coerces to max)
Sonnet 4.5, Opus 4.5, Haiku 4.5, Sonnet 4.x64kbudget_tokens from the ceiling
Opus 4.1, Opus 4.x32kbudget_tokens from the ceiling
Anything else4,096budget_tokens, conservative ceiling

The same table drives Bedrock's anthropic.* model ids.

Google

  • gemini-3* takes thinkingLevel — except gemini-3-pro-image, which stays on budgets.
  • Budget models cap at 32,768 thinking tokens for 2.5 Pro and gemini-3-pro-image, 24,576 for everything else.

xAI

  • grok-4.20 date-stamped -reasoning / -non-reasoning variants have their behavior baked in, so the reasoning parameter is not sent.

Mistral

  • reasoning maps to reasoning_effort only on mistral-small-latest, mistral-small-2603, mistral-medium-3, and mistral-medium-3.5.

Bedrock

Three families by model-id prefix: anthropic.* gets Claude thinking config, openai.* gets reasoning_effort, and everything else gets the generic reasoningConfig (where xhigh becomes max).

Beyond text

CapabilityProviders
EmbeddingsOpenAI, Azure OpenAI, Cohere, any OpenAI-compatible endpoint
RerankingCohere
Image generationOpenAI (gpt-image-2, edits included), fal, Luma, Replicate
Speech generationOpenAI, ElevenLabs, LMNT, Hume, Deepgram, Sarvam
TranscriptionOpenAI, ElevenLabs, Deepgram, AssemblyAI, Rev.ai, Gladia, Sarvam
Video generationxAI, Luma
Realtime voiceOpenAI, xAI, Google (Gemini Live)
Files and skillsOpenAI files; Anthropic files and skills

The async transcription providers (AssemblyAI, Rev.ai, Gladia) submit, poll, and fetch internally — one call either way.

First-class models on compatible endpoints

Named services get dedicated model types with the AI SDK's exact base URLs and environment variables:

ModelEndpointKey from
TogetherAIModelapi.together.xyz/v1TOGETHER_API_KEY
FireworksModelapi.fireworks.ai/inference/v1FIREWORKS_API_KEY
CerebrasModelapi.cerebras.ai/v1CEREBRAS_API_KEY
OpenRouterModelopenrouter.ai/api/v1OPENROUTER_API_KEY
DeepInfraModelapi.deepinfra.com/v1/openaiDEEPINFRA_API_KEY
BasetenModelinference.baseten.co/v1BASETEN_API_KEY
VercelModelapi.v0.dev/v1V0_API_KEY
AIGatewayModelai-gateway.vercel.sh/v1AI_GATEWAY_API_KEY
OllamaModellocalhost:11434/v1no key
LMStudioModellocalhost:1234/v1no key
SarvamModelapi.sarvam.ai/v1SARVAM_API_KEY

OpenAICompatibleProvider remains the general initializer for any other chat-completions endpoint. Replicate has a first-class ReplicateImageModel, but no language-model pack because its prediction API is not the chat-completions wire.