Menu
Important
Stay updated on React2Shell

Models & Providers

Last updated October 23, 2025

The AI Gateway's unified API is built to be flexible, allowing you to switch between different AI models and providers without rewriting parts of your application. This is useful for testing different models or when you want to change the underlying AI provider for cost or performance reasons. You can also configure provider routing and model fallbacks to ensure high availability and reliability.

To view the list of supported models and providers, check out the AI Gateway models page.

Models are AI algorithms that process your input data to generate responses, such as Grok, GPT-5, or Claude Sonnet 4. Providers are the companies or services that host these models, such as xAI, OpenAI, or Anthropic.

In some cases, multiple providers, including the model creator, host the same model. For example, you can use the model from xAI or the model from OpenAI, following the format .

Different providers may have different specifications for the same model such as different pricing and performance. You can choose the one that best fits your needs.

You can view the list of supported models and providers by following these steps:

  1. Go to the AI Gateway tab in your Vercel dashboard.
  2. Click on the Model List section on the left sidebar.

There are two ways to specify the model and provider to use for an AI Gateway request:

In the AI SDK, you can specify the model and provider directly in your API calls using either plain strings or the AI Gateway provider. This allows you to switch models or providers for specific requests without affecting the rest of your application.

To use AI Gateway, specify a model and provider via a plain string, for example:

You can test different models by changing the parameter and opening your browser to .

You can also use a provider instance. This can be useful if you'd like to create models to use with a custom provider or if you'd like to use a Gateway provider with the AI SDK Provider Registry.

Install the package directly as a dependency in your project.

You can change the model by changing the string passed to .

The example above uses the default provider instance. You can also create a custom provider instance to use in your application. Creating a custom instance is useful when you need to specify a different environment variable for your API key, or when you need to set a custom base URL (for example, if you're working behind a corporate proxy server).

The Vercel AI Gateway is the default provider for the AI SDK when a model is specified as a string. You can set a different provider as the default by assigning the provider instance to the variable.

This is intended to be done in a file that runs before any other AI SDK calls. In the case of a Next.js application, you can do this in :

Then, you can use the function without specifying the provider in each call.

Generate vector embeddings for semantic search, similarity matching, and retrieval-augmented generation (RAG).

Alternatively, if you're using the Gateway provider instance, specify embedding models with .

The function retrieves detailed information about all models configured for the provider, including each model's , , , and details.

You can filter the available models by their type (e.g., to separate language models from embedding models) using the property:


Was this helpful?

supported.