Cloudflare AI Gateway: model aliases and fallback

AI Gateway model aliases arrived on November 4. Organize models and fallback without redeploying while preserving format, permission and cost controls.

In this article
In 30 seconds

An alias separates the application from model ordering. It does not make formats interchangeable or guarantee savings or uptime: test each destination and the failure path.

What model aliases change#

On November 4, 2026, Cloudflare added model aliases to AI Gateway. An application requests a custom/ name and the gateway resolves its pool of destinations. Configuration can change without an application redeploy, although propagation can temporarily retain cached configuration.

Documentation: Cloudflare · Model aliases, 4 November 2026 ↗

Choose routing and prepare destinations#

preferred tries eligible models in configured order; smart selects a model per request and uses the default order when it cannot rank them. Request options can override the saved preference. Enable authentication and configure Unified Billing or provider keys before testing.

TestWhat it establishes
Primary respondsThe request format is compatible with that destination.
Primary failsAn eligible alternative responds while respecting policies.
Structured outputThe schema remains valid when the alternative responds.
Workflow costAttempts, tokens and tools are counted, not just the final response.

Documentation: Cloudflare · AI Gateway model aliases ↗

A test request body#

json
{
  "model": "custom/support-fast",
  "input": {
    "messages": [
      {
        "role": "user",
        "content": "Return one short greeting."
      }
    ]
  },
  "options": {
    "routing": {
      "algorithm": "preferred"
    }
  }
}
Documentary example for POST /accounts/{account_id}/ai/run. Select the gateway using cf-aig-gateway-id and authenticate with an appropriate token; this request has not been executed.

Documentation: Cloudflare · AI Gateway model aliases ↗

Roll out the change with control#

  • Start with a staging alias and models that support your application’s request contract.
  • Simulate a recoverable failure and a permission failure. Confirm which allows fallback and what the user sees.
  • Record effective model, configuration version and cost per task without storing sensitive prompt data in logs.
  • Roll out gradually and retain a way to restore the previous order. Renaming the alias also changes the name the application must request.

Compare total cost and completed-task rate against your own criteria. An alias is not a quality measurement and does not enable unsupported models or formats.

Evidence and scope

Documentation review · Sources reviewed:

Method

Se verificaron el anuncio del 4 de noviembre y el contrato documentado de aliases de Cloudflare. El cuerpo JSON respeta la estructura publicada; la matriz de fallos es una pauta de validación, no un benchmark ejecutado.

Limitations

  • No se crearon aliases ni se hicieron llamadas pagadas. La elegibilidad de modelos, formatos, claves y facturación depende del gateway.

Next review planned:

Sources and scope

Documentation checked on November 4, 2026. Examples and decision criteria are editorial proposals; adapt them to your application's contract and validate them in an authorized test environment.

Compare these options

Compare AI models

Review pricing, limits, conditions and sources for each option.

Open comparison
Advice

Is your case different?

Tell us your context and the options you're weighing. We reply with criteria and sources, and never sign you up for anything.

Request advice