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

app.py
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

app.py
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

app.ts
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

app.ts
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

request.sh
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

request.sh
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

Side by side, in plain text

How each one is set up. Checked against each platform’s own docs; see Sources.

TopicLiteLLMOpenRouterPortkeyVercel AI GatewayModelRiver
Pricing modelOpen-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.
BYOKKeys 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-hostSelf-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 livefallbacks 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.
VersioningA 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 free

What ModelRiver doesn’t do yet

If you need one of these today, keep it where it is.

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, LiteLLM, Portkey and Vercel are trademarks of their respective owners. ModelRiver is not affiliated with, endorsed or sponsored by them.