Migration guides
Switching AI gateways?Here's what moves, and what doesn't.
Every gateway names models its own way. On ModelRiver, model is the name of a workflow that holds the model, its backups and its settings. Here is how your current setup maps, and what ModelRiver does not do yet.
- BYOK
- no token markup
- Free plan stops at 25,000 requests/month
One name in model, one workflow behind it
What a workflow bundles, and why model is its name.
A workflow is a saved setup with a name such as support_bot. It holds a primary model, up to 2 backup models, an optional structured output, input guardrails, a USD budget per model and response caching. Backups run on 429, 5xx, 408, 404 and connection errors, including during streaming. Edits go to a Draft; production calls the Live version until you publish, and you can roll back. Your code sends the name through the OpenAI SDK you already use, with your own provider keys and no token markup.
support_bot
- Primary
- openai/gpt-4o
- Backup 1
- anthropic/claude-sonnet-5
- Backup 2
- google/gemini-3.5-flash
- Structured output
- ticket (JSON schema)
- Budget
- $50 per day on the primary model
- Release
- Draft → Live, roll back any time
2 lines of code + 1 workflow
Keep your OpenAI SDK. On the client line, change the base URL and key. On the request line, set model to the name of a workflow.
Step 0: create a workflow in the console with your primary model and backups. Its name is what you send as model.
Before
import os
from openai import OpenAI
client = OpenAI(
base_url="https://your-gateway.example/v1",
api_key=os.environ["GATEWAY_API_KEY"],
)
resp = client.chat.completions.create(
model="openai/gpt-4o",
messages=[{"role": "user", "content": "Summarize this ticket."}],
)After
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.modelriver.com/v1",
api_key=os.environ["MODELRIVER_API_KEY"],
)
resp = client.chat.completions.create(
model="support_bot", # workflow name
messages=[{"role": "user", "content": "Summarize this ticket."}],
)Before
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://your-gateway.example/v1",
apiKey: process.env.GATEWAY_API_KEY,
});
const resp = await client.chat.completions.create({
model: "openai/gpt-4o",
messages: [{ role: "user", content: "Summarize this ticket." }],
});After
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.modelriver.com/v1",
apiKey: process.env.MODELRIVER_API_KEY,
});
const resp = await client.chat.completions.create({
model: "support_bot", // workflow name
messages: [{ role: "user", content: "Summarize this ticket." }],
});Before
curl https://your-gateway.example/v1/chat/completions \
-H "Authorization: Bearer $GATEWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "openai/gpt-4o", "messages": [{"role": "user", "content": "Summarize this ticket."}]}'After
curl https://api.modelriver.com/v1/chat/completions \
-H "Authorization: Bearer $MODELRIVER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "support_bot", "messages": [{"role": "user", "content": "Summarize this ticket."}]}'What maps to what, by platform
OpenRouter
Your
models[]fallbacks and@preset/configs become workflows. Your own provider keys replace credits.model: "openai/gpt-4o"- Workflow name
models: [...]- Up to 2 backup models
@preset/slug- Workflow with Draft and Live
LiteLLM
Each
model_namealias and itsfallbacksbecome a workflow. No proxy to run.model_namealias- Workflow name
fallbacks: [{"a": ["b"]}]- Up to 2 backup models
os.environ/OPENAI_API_KEY- Provider credential in the project
Portkey
The fallback targets in your
x-portkey-configbecome one workflow. No gateway headers on the request.@openai-prod/gpt-4o- Workflow name
strategy.mode: "fallback"+targets- Up to 2 backup models
x-portkey-configheader- Nothing: the name in
modelis enough
Vercel AI Gateway
Model fallbacks and
vmc/virtual models become workflows. BYOK without buying credits.anthropic/claude-sonnet-5- Workflow name
vmc/<slug>- Workflow with Draft and Live
providerOptions.gateway.models- Up to 2 backup models
Side by side, in plain text
How each one is set up. Checked against each platform’s own docs; see Sources.
| Topic | LiteLLM | OpenRouter | Portkey | Vercel AI Gateway | ModelRiver |
|---|---|---|---|---|---|
| Pricing model | Open-source proxy you host. Enterprise priced by usage. Source (opens in a new tab) | Prepaid credits with a platform fee on purchases. BYOK fee above a monthly usage threshold. Source (opens in a new tab) | Plans by recorded logs per month, with a free Developer tier. Source (opens in a new tab) | Credits at provider list price, no token markup. Source (opens in a new tab) | Plans by request volume (Free, Pro, Scale). Your provider bills tokens on your key. |
| BYOK | Keys live in your proxy config or environment. Source (opens in a new tab) | Supported. No fee up to a monthly usage threshold, then a percentage fee. Source (opens in a new tab) | Keys stored as Integrations behind AI Providers. Source (opens in a new tab) | Supported, with no markup. Requires purchased credits. Source (opens in a new tab) | Required: every call uses your provider key. |
| Hosted / self-host | Self-hosted proxy, MIT outside the enterprise/ directory. Source (opens in a new tab) | Hosted. Source (opens in a new tab) | Hosted, plus an MIT-licensed open-source gateway to host yourself. Source (opens in a new tab) | Hosted. Source (opens in a new tab) | Hosted only. |
| Where fallbacks live | fallbacks in config.yaml. Source (opens in a new tab) | models[] in each request, or in a preset. Source (opens in a new tab) | A config with strategy.mode: "fallback", sent by header or ID. Source (opens in a new tab) | providerOptions.gateway.models, or in a virtual model. Source (opens in a new tab) | In the workflow: primary model plus up to 2 backups. |
| Versioning | A config file you version with your own tooling. Source (opens in a new tab) | Presets keep version history and can roll back. The API uses the latest version. Source (opens in a new tab) | Saved configs referenced by ID, updated in the UI or Admin API. Source (opens in a new tab) | Virtual models change without a redeploy. Edits reach new requests within minutes. Source (opens in a new tab) | Draft and Live releases, revision history, rollback. |
Try it with your keys. The Free plan stops at 25,000 requests a month instead of charging overage. Model usage is billed by your provider on your own keys.
Create a workflow freeWhat ModelRiver doesn’t do yet
If you need one of these today, keep it where it is.
Unified billing or credits. You bring a key for each provider.
Per-request model strings or an auto-router. Every call names a workflow you created first.
Load balancing, key rotation, and routing by latency or cost.
Circuit breaking, configurable retries or timeouts. Retries cover dropped connections; timeouts are 120 seconds.
Semantic caching. Response caching is exact-match only.
Output, PII or prompt-injection guardrails. Guardrails check input only.
Image, audio and vision requests, the Responses API and the Anthropic Messages API.
Embeddings from providers other than OpenAI, Google, Cohere and Mistral.
More than 2 backup models per workflow.
A catalog beyond about 139 models across 13 providers. Custom OpenAI-compatible base URLs are supported.
SSO, SAML or SCIM, audit logs, OpenTelemetry and log export.
Self-hosting, or a choice of region.
Third-party compliance attestations and a contractual SLA. We target 99.9% uptime and publish status at status.modelriver.com; a DPA covering GDPR, UK GDPR and CCPA is available.
Frequently asked questions
Why does ModelRiver take a workflow name instead of a model?
So model choice, backups, structured output, guardrails and budgets change in one place, without a code deploy. Draft and Live releases let you test a change and roll it back.
Do I have to change SDKs?
No. ModelRiver is OpenAI-compatible at https://api.modelriver.com/v1. You change the base URL, the API key and the model value. With the Vercel AI SDK, call .chat("your_workflow") so it uses Chat Completions.
What happens if I send openai/gpt-4o by mistake?
The API returns a 404 with code: "model_not_found" and a message that names a workflow in your project using that model, when one exists. GET /v1/models lists the names you can send.
How does ModelRiver bill?
You bring your own provider keys, so your provider bills you for tokens. ModelRiver adds no token markup and charges a plan by request volume: Free $0 for 25,000 requests a month (requests stop at the limit), Pro $49/month, Scale $299/month.
When should I stay where I am?
Each migration guide has a "When to stay" section. Common reasons: you need unified billing, load balancing, self-hosting, OpenTelemetry, or request types ModelRiver does not support yet.
Can I move one workflow at a time?
Yes. Workflows are independent. Move one kind of call, keep the rest on your current gateway, and move the next once you are confident.
Bring your keys. Keep your SDK.
Start on the Free plan, create a workflow and point your SDK at it.
Send us your models[] request or config.yaml (remove keys first) and we’ll reply with the matching workflow setup. Get help moving
Checked · Report an inaccuracy
Sources
- OpenRouter pricing
- OpenRouter model fallbacks
- OpenRouter presets
- LiteLLM proxy config
- LiteLLM proxy reliability
- LiteLLM enterprise
- LiteLLM license
- Portkey pricing
- Portkey configs
- Portkey Model Catalog
- Portkey open-source gateway
- Vercel AI Gateway pricing
- Vercel AI Gateway virtual models
- Hosted / self-host, OpenRouter: openrouter.ai/docs/quickstart
- Where fallbacks live, Portkey: portkey.ai/docs/product/ai-gateway/fallbacks
- Where fallbacks live, Vercel AI Gateway: vercel.com/docs/ai-gateway/models-and-providers/provider-options
OpenRouter, LiteLLM, Portkey and Vercel are trademarks of their respective owners. ModelRiver is not affiliated with, endorsed or sponsored by them.