EnroutiaEU

Aliases

An alias is a model name you own. Your automation asks for `enroutia/keywords-prod`; the panel decides which catalogue model that means today. When a better or cheaper model appears, you change the alias once and every workflow that names it follows, with no edit to any of them.

What an alias is

A name in your workspace pointing at one catalogue model. It carries a task type — lead classification, structured extraction, keyword grouping, product sheet, summary, or custom — and a check profile: what the gateway verifies on every answer, such as “must be valid JSON” or “must be in Spanish”. The name is what your tools see; the model behind it is yours to change.

n8n

In the OpenAI Chat Model node, create a credential with our Base URL and your key. The Model dropdown lists OpenAI's names, so switch the field to Expression and type the alias by hand. The Enroutia community node works the same way: its Model field is a dropdown loaded from the catalogue, and in Expression mode it sends whatever you type.

Base URL   https://api.enroutia.com/v1
Model      enroutia/keywords-prod

Make

In the OpenAI module, keep the custom base URL from the tools guide and put the alias in the model field. Make sends the string as it is.

Any OpenAI-compatible SDK

Nothing changes except the model string.

from openai import OpenAI

client = OpenAI(api_key="TU_CLAVE", base_url="https://api.enroutia.com/v1")

answer = client.chat.completions.create(
    model="enroutia/leads-prod",
    messages=[{"role": "user", "content": "Clasifica este lead: …"}],
)
print(answer.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({ apiKey: "TU_CLAVE", baseURL: "https://api.enroutia.com/v1" });

const answer = await client.chat.completions.create({
  model: "enroutia/leads-prod",
  messages: [{ role: "user", content: "Clasifica este lead: …" }],
});
console.log(answer.choices[0].message.content);

Switching the model from the panel

Open the alias in the panel, pick the new model, write why if you want to remember it later, and save. From the next call on, every automation naming the alias is served by the new model. Nothing is redeployed and no key changes.

Version history and rollback

Every switch creates a version with the model, who changed it, the reason and when. Rolling back is a new version that restores an old one, so the history never loses a step and “who moved this to the expensive model on Tuesday” always has an answer.

v3  mistral-small    ana@agency.es   "cheaper, same JSON validity"   current
v2  gpt-oss-120b     ana@agency.es   "restored from v1"
v1  gpt-oss-120b     ana@agency.es   —

Comparing the current model against a candidate

Before switching, run the alias's current model and a candidate over up to five examples of your own — real prompts, with the expected answer if you have one. The panel shows an estimate first and asks for a budget; the comparison stops the moment it reaches it. You get cost, latency, errors and the check results per model, side by side. The candidate is applied only when you click “Apply candidate”: comparing never changes anything by itself.

What the response says

The `X-Resolved-Model` header keeps naming the catalogue model that actually served the call, not your alias. That is deliberate: it is the name you need to compare prices, read the catalogue changelog, or benchmark against another provider.

X-Requested-Model: enroutia/keywords-prod
X-Resolved-Model: mistral-small

If the model behind an alias is retired

The alias falls back to `auto` and the response says so in its headers. It never answers 404: a retired model is a catalogue event we announce 30 days ahead, and an automation should not break because a date passed. Point the alias at the replacement when you get to it.

X-Requested-Model: enroutia/keywords-prod
X-Resolved-Model: gpt-oss-120b
X-Model-Redirected: true

Name rules

Lowercase letters, digits, dots, underscores and hyphens; it starts with a letter or a digit and is at most 64 characters long. A name that already belongs to the catalogue — `auto`, `mistral-small` — is refused, so an alias can never shadow a model.

^[a-z0-9][a-z0-9._-]{0,63}$

Watch, examples and proposals

Turn the watch on from the alias's page in the panel and it is checked every six hours. Two things can come out of it, each as a signed account webhook.

If fewer than your threshold of the alias's answers passed their checks over the last 24 hours (at least 20 checks), you get alias_check_degraded, once, and the panel shows a Restore button that rolls the alias back to the version before the current one. One click; no comparison to run first.

{
  "event": "alias_check_degraded",
  "data": {
    "alias": "keywords-prod",
    "current_model": "mistral-small",
    "current_version": 3,
    "pass_pct": 71,
    "total": 240,
    "window_hours": 24,
    "threshold_pct": 90,
    "rollback_to_version": 2,
    "rollback_to_model": "gpt-oss-120b"
  }
}

Save up to five examples on the alias — a prompt and, if you have one, what a right answer looks like. Whenever a new chat model joins the catalogue, the watch runs it against your examples within the budget you set (1 to 500 cents, from your balance) and, if it does the job, sends alias_proposal with the quality and the price difference. Applying it from the panel is the same switch you would make by hand, as a new version; dismissing it is nothing. Examples are stored encrypted and deleted with the alias and with the account.

{
  "event": "alias_proposal",
  "data": {
    "alias": "keywords-prod",
    "proposal_id": "prp_01j9x",
    "kind": "new_model",
    "current_model": "mistral-small",
    "candidate_model": "qwen3.6-35b",
    "quality_pct": 100,
    "cost_delta_pct": -38,
    "billed_cents": 4,
    "examples": 5
  }
}

Shadow agreement

Switch shadow sampling on for a key under Keys and one call in a hundred on that key is also sent to a cheaper model; the two answers are compared in memory and only the score is kept. The alias's page then shows how often the cheaper model agreed with the model behind the alias, over the last 30 days — on every call, and on the calls tagged with the alias's own task type when there are enough. You pay the shadow calls, and the key's monthly shadow budget (1 to 500 cents, 50 by default) caps them; when it is spent, sampling pauses until the month turns and you get shadow_budget_reached.

The router reads the same scores. For a task where at least 100 shadowed calls agree 95 % of the time, auto sends that task to the small model even before the checks say so; where 100 or more agree under 80 %, it keeps the default model even if the checks pass. The speed page publishes the aggregate.

See also: Budgets · Credits and balance · Privacy and aggregated metrics · Tags and cost per automation