Migration guidesFrom Vercel AI Gateway
From Vercel AI Gateway, model ids unchanged
Vercel AI Gateway is the default provider in the AI SDK: a model string such as openai/gpt-6-astra reaches it with a Vercel key or OIDC token, served on Vercel's system credentials or on your own keys. INFRO uses the same vendor/model ids, so the edit is the provider and the options, not the model names.
Generally available on every Vercel plan; docs updated through 2026-10-07
INFRO accounts are self-serve. The catalog, the docs, and the API contract are public, the gateway is deployed, and anything beyond v1 is marked Later. Plans and trial
Where things stand
Where it stands
An active Vercel product on every plan. Team routing rules over which models may be used shipped on 2026-07-02.
Whose account serves the request
By default Vercel's system credentials, paid from AI Gateway credits. With BYOK, Vercel's docs say a failed request on your credentials is retried on its system credentials and billed to credits, and BYOK spend is not counted in budgets.
What INFRO does not copy
INFRO does not implement the AI Gateway protocol: the AI SDK's gateway provider cannot point at INFRO. You switch to an OpenAI-compatible provider, which the AI SDK ships.
If your app runs on Vercel and the gateway is doing its job, the integration is hard to beat. Stay if one of these is true.
- You authenticate with Vercel OIDC tokens from your deployments and want no gateway key at all. INFRO takes its own keys only.
- You use embeddings, Realtime or the AI SDK's gateway-only features. INFRO does not serve embeddings or Realtime.
- You want provider choice by cost, time to first token or throughput (
sort). INFRO has no per-request sorting. - You want access to models without an account at each provider. INFRO runs only on accounts you hold.
- You need zero-data-retention routing or
inferenceRegionper request. INFRO has neither; residency is on the roadmap.
The edits, one row each. Everything not listed here stays as it is.
| Vercel AI Gateway | INFRO | |
|---|---|---|
| Base URL | https://ai-gateway.vercel.sh/v1, or the AI SDK's default gateway provider. | https://api.infro.io/v1, through createOpenAI({ baseURL }) in the AI SDK. |
| Key | AI_GATEWAY_API_KEY or a Vercel OIDC token. | INFRO_API_KEY, an INFRO gateway key. Your provider credentials move into INFRO as connections. |
| Model id | anthropic/claude-opus-5 | anthropic/claude-opus-5, unchanged. In the AI SDK, call infro.chat(id): the provider's bare callable targets the Responses API. |
| Options | providerOptions.gateway { order, only, models, user, tags }, ai-reporting-* headers. | A route for the order, routing.providers for only, fallbacks for models, metadata { user_id, tags } for user and tags. |
Before · Vercel AI Gateway
import { generateText } from "ai";
const { text } = await generateText({
model: "anthropic/claude-opus-5",
prompt: "Hello",
providerOptions: {
gateway: {
order: ["vertex", "anthropic"],
user: "user_123",
tags: ["feature:chat"],
},
},
});After · INFRO
import { createOpenAI } from "@ai-sdk/openai";
import { generateText } from "ai";
const infro = createOpenAI({
baseURL: "https://api.infro.io/v1",
apiKey: process.env.INFRO_API_KEY,
});
const { text } = await generateText({
// A route named "chat" holds the order: Vertex, then Anthropic.
model: infro.chat("chat"),
prompt: "Hello",
headers: { "X-INFRO-User-Id": "user_123", "X-INFRO-Feature": "chat" },
});`.chat()`, not the bare callable
createOpenAI(...)(id) targets OpenAI's Responses API. Use infro.chat(id) for Chat Completions, which every INFRO connection serves; /v1/responses is served too, but needs the whole conversation each turn.
Provider slugs differ
Vercel's vertex and bedrock are INFRO's google-vertex and aws-bedrock in routing.providers. Order is set on a route in the console, not per request.
Budgets see every request
Every INFRO request runs on your own account, so every request counts against your budgets. A budget refuses at its ceiling with 402 budget_exceeded.
Vercel AI Gateway's objects against INFRO's, from Vercel AI Gateway's public documentation read on 19 October 2026 and checked against what the gateway implements. Three rows say INFRO has nothing.
| Vercel AI Gateway | What it does there | In INFRO |
|---|---|---|
| AI Gateway API keys and OIDCdifferent | Team keys or Vercel OIDC tokens; keys carry a budget and expiry. | Gateway keys with a spend limit, model allowlist, provider list, IP ranges and environment, rotated or switched off. No OIDC token exchange. |
| System credentials and BYOKdifferent | Vercel's provider accounts by default; your credentials optional, with fallback to system credentials. | Your connections only, never a shared pool. Every provider bills you directly. |
| `order`, `only`different | Try providers in order, or restrict to some, per request. | A route holds the order and failure rules; routing.providers restricts per request. |
| `sort` by cost, TTFT, TPSnothing | Pick a provider per request by cost or speed. | Nothing. A route's order or weights decide. |
| Model fallbackssame shape | models, tried in order. | fallbacks, up to 5. |
| Routing rulessame shape | Team rules over which models may be used. | Allow and block lists per organization, project and key, including whole vendors. |
| Budgetssame shape | Caps per team, project, key and user, 402 when exceeded; BYOK spend excluded. | Budgets per organization, project, member, key and end customer, 402 before the provider is called; every request counts. |
| Custom reportingsame shape | User and tags per request; a report API grouped by user, model, tag, provider. | metadata.user_id and tags on every request, usage grouped by project, key, model, user and tag, and exports. |
| Automatic prompt cachingdifferent | caching: 'auto' adds provider cache markers; session affinity header. | Provider prompt caching works as the provider defines it; cache_control reaches Anthropic as written on /v1/messages. INFRO adds no markers. Separately, an opt-in exact-match response cache. |
| Trace Drainssame shape | OpenTelemetry traces to your tool. | Spans to your OpenTelemetry collector from the request path. |
| Embeddings and Realtimenothing | Served by the gateway. | Not served. |
| ZDR and inference regionnothing | Per-request zero-data-retention routing and inferenceRegion. | Not available. Retention at the provider follows your contract with it; residency is on the roadmap. |
Our reading of Vercel AI Gateway’s published documentation, not a trial or a benchmark. If we have read something wrong, tell us and we will fix the row.
What INFRO does not do
- Implement the AI Gateway protocol or the AI SDK's
gatewayprovider. - Accept Vercel OIDC tokens.
- Serve embeddings or Realtime.
- Sort providers per request by cost or speed.
- Provide model access without your own provider accounts.
What does not come across
- Request logs and custom reports. There is no importer.
- AI Gateway credits. They stay with Vercel.
- Budgets and routing rules. Recreate them as INFRO budgets and allowlists.
Questions
- Do I have to change model ids?
- No. Both use
vendor/model, for exampleanthropic/claude-opus-5. CheckGET /v1/modelsfor what your INFRO connections serve. - Does the AI SDK work with INFRO?
- Yes, through
createOpenAIfrom@ai-sdk/openaiwithbaseURL: https://api.infro.io/v1, callinginfro.chat(modelId). - Who bills me for model usage?
- Your providers, directly, on your own accounts. INFRO is a subscription with 0% markup on model spend.
Move with us, or on your own
The migration program maps your Vercel AI Gateway setup to INFRO connections, routes and budgets on a call and moves the first service with you. Your providers keep billing you directly; INFRO is a subscription and adds 0% to model spend.
Sources
Every statement on this page about Vercel AI Gateway comes from one of these, read on 19 October 2026. Nothing is inferred from a trial, a benchmark, or a conversation.
- Vercel docs — AI Gatewayread 2026-10-19
- Vercel docs — OpenAI Chat Completions APIread 2026-10-19
- Vercel docs — Chat Completions advancedread 2026-10-19
- Vercel docs — BYOKread 2026-10-19
- Vercel docs — Provider filtering and orderingread 2026-10-19
- Vercel docs — Budgetsread 2026-10-19
- Vercel docs — Custom reportingread 2026-10-19
- Vercel docs — Automatic cachingread 2026-10-19
- Vercel docs — Pricingread 2026-10-19
- Vercel changelog — AI Gateway routing rulesread 2026-10-19