Providers
AI_PROVIDER_NPM chooses the provider. If you leave it unset, UIGraph uses the default, @ai-sdk/openai-compatible, which works with any service that offers an OpenAI-style API.
To use a specific provider instead, set AI_PROVIDER_NPM to one of the values below. We don't re-document each provider here, the AI SDK already has a full page for every one, with the exact model names and any provider-specific notes. Click the link for the provider you want.
Supported providers
| Provider | AI_PROVIDER_NPM | Learn more |
|---|---|---|
| Any OpenAI-compatible API (default) | @ai-sdk/openai-compatible | OpenAI-compatible providers |
| OpenAI | @ai-sdk/openai | docs |
| Anthropic | @ai-sdk/anthropic | docs |
| Google Generative AI | @ai-sdk/google | docs |
| xAI (Grok) | @ai-sdk/xai | docs |
| Azure OpenAI | @ai-sdk/azure | docs |
| Amazon Bedrock | @ai-sdk/amazon-bedrock | docs |
| Groq | @ai-sdk/groq | docs |
| Fal | @ai-sdk/fal | docs |
| DeepInfra | @ai-sdk/deepinfra | docs |
| Google Vertex AI | @ai-sdk/google-vertex | docs |
| Mistral | @ai-sdk/mistral | docs |
| Together.ai | @ai-sdk/togetherai | docs |
| Cohere | @ai-sdk/cohere | docs |
| Fireworks | @ai-sdk/fireworks | docs |
| DeepSeek | @ai-sdk/deepseek | docs |
| Cerebras | @ai-sdk/cerebras | docs |
| Perplexity | @ai-sdk/perplexity | docs |
| Luma | @ai-sdk/luma | docs |
| Baseten | @ai-sdk/baseten | docs |
| OpenRouter | @openrouter/ai-sdk-provider | docs |
| Ollama | ollama-ai-provider-v2 | docs |
| MiniMax | vercel-minimax-ai-provider | docs |
| AIHubMix | @aihubmix/ai-sdk-provider | docs |
| Cloudflare Workers AI | workers-ai-provider | docs |
| FriendliAI | @friendliai/ai-provider | docs |
| Helicone | @helicone/ai-sdk-provider | docs |
| SambaNova | sambanova-ai-provider | docs |
| Zhipu (Z.AI) | zhipu-ai-provider | docs |
| AI Gateway | ai-gateway-provider | community providers |
| Opencode | ai-sdk-provider-opencode-sdk | community providers |
The default @ai-sdk/openai-compatible works with any service that offers an OpenAI-style API, set AI_PROVIDER_API_URL to its base URL. See Examples.