Skip to content

Model aliases

Last updated: 2026-11-21T10:44:38-03:00 (UTC-3)

Clients keep the model names they were written with. When the operator renames a model, standardizes names (for example anthropic-claude-sonnet-4-6) or moves a team to a new deployment, the old names (claude-sonnet-4-6) must keep working. Without aliases, the operator declares a second model with a copy of the same targets and policies, and every key, team policy and organization must list both names. The copies drift apart: a retry, cache, guardrail or budget changed on one name silently does not apply to the other.

A model alias is a models[] entry with alias_of: another client name for one canonical model. It owns nothing of its own, so the two names cannot drift. Flag: model_aliases (off by default, operator control).

An organization alias is a client name owned by one organization for one canonical model, resolved only for that organization’s keys. Flag: organization_model_aliases (off by default, operator control, requires organizations and model_aliases).

A moving alias is the same kind of entry with follows instead of alias_of: a name such as claude-sonnet-latest that serves the newest version of a model family you declared, and moves when you declare or enable a newer one. Flag: model_follows (off by default, operator control, requires model_aliases).

features:
model_aliases: true
models:
- id: anthropic-claude-sonnet-4-6 # the canonical model
capabilities: [messages]
targets:
- provider: anthropic
model: claude-sonnet-4-6
- id: claude-sonnet-4-6 # what existing clients send
alias_of: anthropic-claude-sonnet-4-6
keys:
- id: checkout
allowed_models: [anthropic-claude-sonnet-4-6] # may call both names
- id: legacy-app
allowed_models: [claude-sonnet-4-6] # may call only the alias

The same entry can be created in the console (Models → Edit routing → Alias of) or with the model API (PUT /api/v1/admin/models/{id} with {"id": "claude-sonnet-4-6", "alias_of": "anthropic-claude-sonnet-4-6", "targets": []}). Choosing Alias of hides the targets and policy fields, because an alias has none.

The flag is a runtime flag (Settings → Features): turning it on or off applies to the next request. With the flag off, alias entries stay stored and validated, but they serve nothing: a request for the alias answers 404 model_not_found (or 403 model_forbidden for a key that names only the canonical model), and the alias is not listed in /v1/models.

An alias entry declares only these fields. Any other field (targets, capabilities, retry, cache, semantic_cache, latency_routing, auto_route, routing_strategy, fallbacks, request_timeout, stream_timeouts, unsupported_parameters, stream_usage, hub) is refused at load and on the model API, because the alias takes them from its canonical model.

Field Default Values
models[].id required The client name. Unique across all models and aliases; not a wildcard (prefix/*), not *, not group:…. When the canonical model serves generate_content, letters, digits, dot, dash or underscore only (the name travels in the URL path).
models[].alias_of none The canonical model’s id. It must exist, must not be an alias itself and must not be a wildcard model.
models[].disabled false Disables this name only. Disabling the canonical model disables its aliases too.

Validation, at load and on every model API write:

  • No chains, no cycles. alias_of must name a model with targets. An alias of an alias is refused with the name of the model to point to instead, so a → b → a cannot exist.
  • No collisions. An alias ID cannot repeat any other model or alias ID.
  • The canonical model cannot disappear under its alias. Deleting a model that an alias names is refused (422 model_in_use); delete or repoint the alias first.

A request for the alias is served exactly as a request for the canonical model. Once the key passes the access check with the name it sent, the gateway continues under the canonical name, so everything keyed by model name applies unchanged:

  • targets, weights and routing strategy, capabilities and protocol translation, retries, fallbacks (context window, content policy, target order), latency routing, request timeout and stream clocks, request parameter policy;
  • the exact and semantic cache policies (semantic cache entries are shared with the canonical model; exact cache entries are not, because the exact key covers the request body, which carries the model name the client sent);
  • guardrails and guardrail policies that name the canonical model;
  • budgets and TPM/TPD quota policies on the canonical model (subject: model), and prices for usage valuation;
  • evaluation capture and the analytics totals of the canonical model.

Because of this, policies name canonical models. A guardrail, a guardrail policy or a model quota policy that names an alias is refused at load and on its API, with the canonical name to use: such a policy would never match, since no request is evaluated under the alias name. Configuration references that the gateway follows on the client’s behalf (fallbacks, auto-routing defaults, routes, tiers and embeddings, semantic cache embeddings, vector store OCR and embedding models, moderation guardrail models, evaluation judges and evaluation experiment models) also name canonical models.

Granting the canonical model grants its aliases; granting an alias grants only the alias.

Granted May call the canonical model May call the alias
Canonical model yes yes
Alias only no (403 model_forbidden) yes
* yes yes

The rule holds at every layer, and the layers still intersect as ceilings:

  • Keys. allowed_models: [anthropic-claude-sonnet-4-6] covers claude-sonnet-4-6. A key whose list covers the canonical model through a wildcard entry (prefix/*) covers its aliases too. A prefix/* entry grants an alias by the alias’s own ID too, whatever its canonical model: an alias openai/legacy of an Anthropic model is reachable through openai/*, exactly like a model declared with that ID. Choose alias IDs outside wildcard prefixes the ceiling should not cover; with model_aliases off, such an ID also stops resolving through the wildcard model (it answers 404).
  • Team policies. A team allowed the canonical model lets its keys call the alias. A team allowed only the alias removes the canonical model from every key of the team, even a key that lists it, and a new key under that team cannot ask for the canonical model (403 outside_team_policy).
  • Organization ceilings. The same: an organization allowed the canonical model covers the alias; one allowed only the alias keeps its teams on the alias.
  • Access groups. A group that lists the canonical model grants its aliases to every key that references the group.

So a legacy application can be moved onto a key that names only the old client name, without that key ever reaching the canonical name, while every new key names the canonical model and reaches both.

  • GET /v1/models lists the alias as its own model ({"id": "claude-sonnet-4-6", "object": "model", …}) when the key may use that name, with the canonical model’s capabilities deciding whether it appears. GET /v1/models/{id} answers the same way; a name the key cannot use is 404, never 403.
  • GET /v1/model/info (model information, model_info) shows the alias with the canonical model’s mode, capabilities and prices.
  • Answers the provider writes itself (an OpenAI-protocol target answering Chat Completions or embeddings natively) carry the provider’s own model field, as for any model. Answers the gateway builds (translated routes: Anthropic, Gemini, Bedrock, Cohere, OCI and SageMaker targets, the Responses API target, translated Messages, Responses and GenerateContent, Bedrock and Cohere embeddings, and semantic cache hits, whose stored entry the model and its aliases share) carry the name the client sent, so a key allowed only the alias never sees the canonical name.

Usage keeps both names:

Where model Name the client sent
Usage events, request log API (GET /api/v1/admin/logs, /requests/{id}) canonical model requested_model (omitted when the client named the canonical model)
Console request log canonical model shown as … via <alias> in the Model column
Request log CSV export (/api/v1/admin/logs/export) canonical model requested_model column, present while model_aliases is on
Log destinations canonical model requested_model
Stdout request line canonical model requested_model attribute, only on alias requests
Analytics totals, budgets, valuation canonical model —

Analytics and budgets aggregate by the canonical model on purpose: the alias is the same model and the same spend. The request log filter by model uses the canonical name.

Some clients want “the newest Sonnet” rather than a dated model ID. A moving alias gives them one stable name while the operator keeps control of what it reaches: it resolves only among the models you declared, never to a model the configuration does not contain, and every change of what it serves is logged and can be delivered as an alert. Nothing is rewritten silently.

features:
model_aliases: true
model_follows: true
models:
- id: sonnet-4-5
targets:
- provider: anthropic
model: claude-sonnet-4-5-20250929
- id: sonnet-5-5 # prepared, not yet serving
disabled: true
targets:
- provider: anthropic
model: claude-sonnet-5-5
- id: claude-sonnet-latest # what clients send
follows:
family: claude-sonnet
provider: anthropic
keys:
- id: assistant
allowed_models: [claude-sonnet-latest]

Here claude-sonnet-latest serves sonnet-4-5. Enabling sonnet-5-5 (in YAML, in the console, or with the model API) moves it to sonnet-5-5 on the next published configuration, and the gateway reports the change.

The same entry can be created in the console (Models → Edit routing → Moving alias) or with the model API (PUT /api/v1/admin/models/{id} with {"id": "claude-sonnet-latest", "follows": {"family": "claude-sonnet", "provider": "anthropic"}, "targets": []}). The editor shows the current resolution and every candidate it considered.

A moving alias declares only id, follows and disabled; every other field is refused, as for alias_of. follows and alias_of cannot be combined.

Field Default Values
models[].id required The client name: letters, digits, dot, dash or underscore, 1–128 characters. Unique across all models and aliases; not a wildcard.
models[].follows.family required The upstream model ID pattern of the family, 1–200 characters. One * marks where the version goes (gemini-*-flash); it stands alone between separators (-, ., _, @, :), so gpt-4* is refused. Without it the version follows the family after a dash (claude-sonnet means claude-sonnet-*). The family is a stem, not a pinned version: claude-sonnet-4 also covers claude-sonnet-4-5, as version 5.
models[].follows.provider required A providers[] ID. Every target of a candidate must use it.
models[].disabled false Disables this name only.

When a configuration is loaded or published (boot, a YAML reload, any console or API change), the gateway computes each moving alias once and serves that answer until the next publication; the request path never consults a remote catalog. A declared model is a candidate when one of its targets is on follows.provider with an upstream model of the family. It is eligible when, in addition:

  • every target is on follows.provider and names the same upstream model, so no fallback target or retry can leave the provider or the version;
  • it is enabled, is not an auto-routing model or a passthrough model, and declares no context_window_fallback or content_policy_fallback (a semantic fallback sends a refused request to another model, possibly on another provider);
  • it is an exact model (not a wildcard prefix/*, not another alias).

The version is the part of the upstream model ID that the * covers. It must be up to six numbers of one to three digits, optionally followed by a date stamp (20YYMMDD or 20YY-MM-DD, a real month and day) and a revision: 4-5, 2.5, 4-5-20250929, 2024-07-18, 4-5-20250929-v1:0, 4-5@20250929. Anything with words (latest, preview, exp, mini) is not a version, so a provider’s own moving name and a preview never qualify. Among eligible models the newest wins, deterministically:

  1. higher version numbers, compared number by number (5 after 4-5, 4-5 after 4, 10 after 9);
  2. then the later date stamp (a dated snapshot after the undated name of the same version);
  3. then the higher revision;
  4. then, for identical versions, the lowest model id.

When no model is eligible the alias serves nothing: a request answers 404 model_not_found, and the resolution says no_eligible_model.

A catalog update reaches a moving alias through your declared models, never directly. Catalog onboarding (catalog_onboarding) prepares new models disabled: enabling one, or declaring a model yourself, is what moves the alias. This keeps every model the alias can reach priced, policed and reviewed.

A moving alias is an alias: once the key passes the access check with the moving name, the request continues as the resolved canonical model, with its targets, guardrails, budgets, quotas, caches and prices (see What the alias inherits). Two differences from alias_of:

  • Access is by name only. Granting claude-sonnet-latest (or *, or a prefix/* entry covering its ID) grants it. Granting the model it currently resolves to does not grant the moving name, and granting the moving name does not grant the canonical model, so a change of resolution never changes who may call what.
  • Policies cannot name it. Guardrails, guardrail policies, model quota policies, rate policies and configuration references (fallbacks, auto-routing targets) name canonical models; naming a moving alias is refused at load and on the API, because what it reaches changes.
Where What
Usage events, request log API, CSV export, log destinations, stdout request line model is the resolved canonical model, requested_model the moving name, exactly as for alias_of (see What is recorded)
Console request log <resolved model> via <moving alias> in the Model column
GET /api/v1/admin/config, model entry follows and the read-only follow_resolution: model, upstream_model, version, reason when unresolved, enabled, serving and the candidates with skipped reasons (disabled, auto_route, passthrough, semantic_fallback, targets_outside_provider_or_version)
Console models page Follows <family> on <provider> · serves <model> on the card; the editor lists the candidates
Logs, at boot and for a new alias model_follow_resolved (info) or model_follow_unresolved (warning), once; with PostgreSQL, the first configuration read after boot logs the effective answer the same way when console changes make it differ from the YAML, without an alert
Logs, on every change model_follow_resolution_changed (warning) with alias, previous_model, model, both upstream models and control_version, on each replica
Alert event model_follow_changed On a change while the alias is enabled and both flags are on, for every alert channel that subscribes to it; one event per change and control version across replicas

GET /v1/models and /v1/model/info list the moving alias by its own name with the shape of the model it resolves to, and gateway-built answers carry the moving name, as for alias_of.

model_follows is a runtime flag. Off, moving aliases stay stored, validated and resolved (the admin view still shows what they would serve) but serve nothing (404). A resolution change made while the flag is off is logged but not alerted. Turning model_aliases off while model_follows is on is refused.

In a multi-tenant gateway each organization can give its own names to the gateway’s models: fast for one organization, cheap for another, without a gateway-wide name that every organization sees. An organization alias is managed by that organization’s organization admin and by the global administrator, or declared in YAML.

features:
organizations: true
model_aliases: true
organization_model_aliases: true # operator control, default false; requires PostgreSQL
organizations:
- id: acme
name: Acme
teams: [team-acme]
model_aliases: # read-only in the console and the API
- id: fast
alias_of: anthropic-claude-sonnet-4-6

The console has the same editor in My organization → Model aliases (organization admin) and Organizations → Model aliases of (global administrator). The API:

PUT /api/v1/admin/organizations/acme/model-aliases/fast
Content-Type: application/json
X-CSRF-Token: <token>
{"alias_of": "anthropic-claude-sonnet-4-6"}

Without version it creates the alias (201); with the current version it replaces it (200). DELETE takes {"version": N}, and GET /api/v1/admin/organizations/{id}/model-aliases lists them. An organization admin reaches only its own organization’s (another answers 404). Every write is audited with the organization, so it appears in that organization admin’s audit view.

Field Default Values
id required 1–128 letters, digits, dot, dash, underscore, colon or @; no / or *, so no prefix/* entry of a key or a ceiling ever grants it by name. Not the ID of a gateway model. Unique in its organization; at most 200 per organization.
alias_of required An exact, enabled canonical gateway model: not an alias, a moving alias, a wildcard or an auto-routing model. When the organization has a model ceiling, the ceiling must allow it.
disabled false Disables this name only.

Resolution. For a key whose team belongs to organization O, a model name resolves to O’s alias first, then to the gateway-wide alias or model of that name; a gateway model with targets always keeps its own name. An organization alias with the name of a gateway-wide alias shadows that alias for O’s keys only: the editor and the API show shadows with the canonical model the gateway-wide alias served. Keys of other organizations, and keys with no team, never resolve O’s aliases, on any route (chat completions, Messages, Responses, model listing and the rest).

Access. An organization alias grants nothing. A key may call it only when it may call alias_of (through its own list, its team policy and the organization ceiling, as for any alias); a key that names the shadowed gateway-wide alias literally, without being allowed the organization alias’s target, loses that name. It introduces no target, credential or provider: once resolved, the request is the canonical model’s, with everything listed in What the alias inherits, and usage records requested_model as for any alias.

Freshness. The aliases are read with the organization ceiling on every request, in the same query, so a change on any replica applies to the next request on every replica, with no cache to invalidate. An alias whose target was later removed, disabled or made an alias serves nothing (404); the list shows serving: false and the reason.

Turning it off. organization_model_aliases is a runtime flag. Off, organization aliases stay stored but are ignored on the request path (the gateway-wide names apply again) and the API answers 404 feature_disabled.

Limits. A batch runs later, outside the key’s request, where only gateway-wide names resolve: a batch line that names an organization alias is refused when the batch is created; name the model it points to. Policies (guardrails, budgets, rate policies) name canonical models, never an organization alias.

  • Migration 178 adds the organization model aliases table; it is additive. Before rolling back to a binary without organization aliases, remove organizations[].model_aliases from YAML: older binaries refuse the unknown field.

  • Moving aliases (follows, flag model_follows) need no migration: usage already stores requested_model. Before rolling back to a binary without them, remove follows entries: older binaries refuse the unknown field.

  • Migration 109 adds the nullable requested_model column to gateway_usage_events. It is additive; existing rows stay NULL and their fingerprints do not change. Older binaries refuse a schema at 109, as with every migration; roll out compatible binaries before enabling the flag.

  • Before rolling back to a binary without model aliases, remove alias_of entries from the YAML and the console: older binaries refuse the unknown field.

m7gtwcontact@m7gtw.com