Migration guidesFrom LLM Gateway
From LLM Gateway, keeping your own provider keys
LLM Gateway (llmgateway.io) runs on its own provider access paid from credits, on your own provider keys, or both with a fallback from yours to credits. Teams on its BYOK mode are closest to INFRO already. This page maps that mode, and says plainly what INFRO does not do.
llmgateway.io; AGPLv3 core with a licensed `ee/` edition; hosted or self-hosted
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
Licence
theopenco/llmgateway is AGPLv3 at its core, with commercial features under a separate Enterprise licence in ee/. It is hosted at api.llmgateway.io and can be self-hosted.
Whose account serves the request
Its own provider access on prepaid credits, your provider keys (no gateway markup, per its docs), or a hybrid that falls back from your keys to credits.
Beyond a gateway
Its docs also cover coding plans, a chat app, a provider portal, a payments SDK, decisions and a System One endpoint. Those are not part of this mapping.
It is open source and broad. Stay if one of these is what you use it for.
- You self-host under the AGPL. INFRO is hosted; self-hosted or hybrid is an enterprise agreement.
- You use bare model ids so it picks a provider by price, uptime, throughput or latency, or
autoandsmartmodel selection. INFRO does not pick by price or speed. - Your AI SDK app uses the AI Gateway protocol endpoint and you want a base-URL-only switch. INFRO does not implement that protocol.
- You use embeddings, Realtime, OCR or search through it, or want model access without your own provider accounts.
The edits, one row each. Everything not listed here stays as it is.
| LLM Gateway | INFRO | |
|---|---|---|
| Base URL | https://api.llmgateway.io/v1, or /v1/ai for the AI SDK gateway protocol. | https://api.infro.io/v1 |
| Key | An LLM Gateway key. | An INFRO gateway key; your provider keys become connections. |
| Model id | gpt-5.6-terra (gateway chooses), openai/gpt-5.6-terra (pinned), auto, dynamic/<name>. | openai/gpt-5.6-terra, or a route name in place of dynamic/<name>. |
| Headers | X-LLMGateway-User-ID, X-LLMGateway-Feature, X-No-Fallback, x-no-cache. | X-INFRO-User-Id, X-INFRO-Feature; routing.providers to keep a request on one provider. |
Before · LLM Gateway
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.llmgateway.io/v1",
apiKey: process.env.LLM_GATEWAY_API_KEY,
defaultHeaders: {
"X-LLMGateway-User-ID": "user_123",
"X-LLMGateway-Feature": "chat",
},
});
await client.chat.completions.create({
model: "openai/gpt-5.6-terra",
messages: [{ role: "user", content: "Hello" }],
});After · INFRO
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.infro.io/v1",
apiKey: process.env.INFRO_API_KEY,
defaultHeaders: {
"X-INFRO-User-Id": "user_123",
"X-INFRO-Feature": "chat",
},
});
await client.chat.completions.create({
model: "openai/gpt-5.6-terra",
messages: [{ role: "user", content: "Hello" }],
});AI SDK apps
Replace the gateway provider with createOpenAI({ baseURL: "https://api.infro.io/v1", apiKey }) from @ai-sdk/openai and call .chat(modelId). Model ids stay vendor/model.
Failover is on by default
A request naming a model fails over across your connections that serve it. routing.providers.allow keeps it on chosen providers, as X-No-Fallback or a pinned id did.
Dynamic routes become routes
Recreate each dynamic/<name> flow as a route with the same targets; a prompt classifier covers routing by prompt type.
LLM Gateway's objects against INFRO's, from LLM Gateway's public documentation read on 19 October 2026 and checked against what the gateway implements. Three rows say INFRO has nothing.
| LLM Gateway | What it does there | In INFRO |
|---|---|---|
| Provider keys (BYOK)different | Your keys with allowed models, spend caps and rate limits; hybrid fallback to credits. | Connections with models per key; no fallback to anyone else's account. |
| Routing by price, throughput, latencynothing | Bare ids and routing strategies choose a provider. | Nothing. Routes set the order or weights. |
| `auto`, `smart`, dynamic routesdifferent | Model chosen per request, or by a named flow. | Routes, with a prompt classifier that sends each class of prompt to its own targets. |
| API keys and IAM rulessame shape | Spend limits and model or provider allow and deny per key. | Key spend limits, allowlists and provider lists per key; budgets at four more scopes. |
| Gateway response cachingsame shape | Project-level response cache with a TTL; x-no-cache to bypass. | Opt-in exact-match cache with a TTL and namespace. |
| Metadata headersdifferent | Any X-LLMGateway-* header. | metadata in the body, or X-INFRO-User-Id, X-INFRO-Feature, X-INFRO-Trace-Id. |
| AI SDK gateway protocolnothing | Drop-in for @ai-sdk/gateway apps by base URL. | Not implemented. Use the AI SDK's OpenAI provider. |
| Guardrails, audit logs, SSOsame shape | Content rules and security events; audit logs and SSO on Enterprise. | Guardrails, an audit log, and SSO with SCIM from the Business plan. |
| Embeddings, Realtime, OCR, searchnothing | Served. | Not served. |
| Self-hostingdifferent | AGPLv3 core, Docker and Kubernetes. | Hosted. Self-hosted or hybrid is an enterprise agreement.Enterprise — Available on an enterprise agreement rather than self-serve. |
Our reading of LLM 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
- Choose a provider by price, uptime, throughput or latency.
- Implement the Vercel AI Gateway protocol.
- Serve embeddings, Realtime, OCR or search.
- Fall back to an account that is not yours.
- Run under an open-source licence.
What does not come across
- Logs, analytics and cost history. There is no importer.
- Credits on your LLM Gateway account.
- Dynamic routes and IAM rules as objects. Recreate them as routes and allowlists.
Questions
- Does INFRO support the Vercel AI Gateway protocol like LLM Gateway does?
- No. AI SDK apps call INFRO through
@ai-sdk/openaiwith a base URL ofhttps://api.infro.io/v1; model ids stay the same. - Who pays the providers?
- You do, directly, on your own accounts. INFRO is a subscription with 0% markup on model spend.
- Is INFRO open source?
- No. INFRO is hosted; a self-hosted or hybrid deployment is an enterprise agreement.
Move with us, or on your own
The migration program maps your LLM 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 LLM Gateway comes from one of these, read on 19 October 2026. Nothing is inferred from a trial, a benchmark, or a conversation.
- LLM Gateway docs — Introductionread 2026-10-19
- LLM Gateway docs — Quickstartread 2026-10-19
- LLM Gateway docs — Routingread 2026-10-19
- LLM Gateway docs — Metadataread 2026-10-19
- LLM Gateway docs — Gateway cachingread 2026-10-19
- LLM Gateway docs — API keys and IAMread 2026-10-19
- LLM Gateway docs — Provider keysread 2026-10-19
- LLM Gateway docs — Billingread 2026-10-19
- LLM Gateway docs — AI SDK gateway protocolread 2026-10-19
- GitHub — theopenco/llmgatewayread 2026-10-19