> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/control-center/ai-gateway/how-model-routing-works.md).

# How Model Routing Works

Understand families, providers, gateways, credentials, and tiers before you configure them.

Every model request an agent makes passes through AI Gateway. The gateway selects a family, resolves a tier to a model, and sends the request through an available provider.

Read this page before you open [Gateway Settings](/control-center/ai-gateway/gateway-settings.md). The screens there expose one field per concept below, and the fields make more sense once the routing model is clear.

## Routing building blocks

{% columns %}
{% column %}

#### Model and family

A **model** is an individual endpoint, such as *Claude Sonnet 4.5* or *GPT 4o*.

A **model family** groups related models from one vendor. Configuration applies at the family level, not to individual models.
{% endcolumn %}

{% column %}

#### Provider and gateway

A **provider** hosts and serves a model.

A **gateway** routes a family's requests to its configured providers and applies authentication and failover.
{% endcolumn %}
{% endcolumns %}

A **tier** sits on top: it names a capability level, and each family maps its own model to each tier.

## Model families

Enable only the families your organization approves. One enabled family is the default and handles any request that doesn't name a family.

| Family        | What it offers                                                                    |
| ------------- | --------------------------------------------------------------------------------- |
| **Anthropic** | Claude Sonnet, Opus, and Haiku. Reasoning, long context, and vision.              |
| **Gemini**    | Gemini Pro and Flash. Long context, fast, low-cost inference. Default as shipped. |
| **OpenAI**    | GPT 4o, GPT 4.1, GPT 5.x, and the o-series. General reasoning and tool use.       |

{% hint style="info" %}
Exactly one enabled family is the default. Setting a new default removes the previous one.
{% endhint %}

**Gemini and Google name the same family.** [Gateway Settings](/control-center/ai-gateway/gateway-settings.md) labels it Gemini; [Model Catalog](/control-center/ai-gateway/model-catalog.md) labels it Google. The underlying family is the same.

## Providers

A family can use more than one provider. When several providers are enabled for a family, the gateway has more than one path to the same model.

| Family    | Available providers                     |
| --------- | --------------------------------------- |
| Anthropic | Anthropic direct; GCP Model Garden      |
| Gemini    | Google AI Studio; Google Agent Platform |
| OpenAI    | OpenAI direct; Azure OpenAI             |

The provider you choose decides more than availability. It decides which cloud account runs the inference, which region it runs in, and who the provider bills.

## Gateways and credentials

{% tabs %}
{% tab title="Uptiq AI Gateway" %}
The default gateway. It provides managed routing, retries, caching, failover, and observability. Configure each provider in the family with a UPTIQ managed key or your own key.
{% endtab %}

{% tab title="OpenRouter" %}
An alternative gateway that uses your organization's own OpenRouter API key. Enter the key, then fetch the models enabled on that account. Requests for the selected family are proxied through OpenRouter to whichever upstream serves the model.
{% endtab %}
{% endtabs %}

| Credential option      | Who supplies it   | Who is billed                     |
| ---------------------- | ----------------- | --------------------------------- |
| **UPTIQ managed key**  | Uptiq             | Uptiq-managed capacity or credits |
| **Bring your own key** | Your organization | The provider bills you directly   |
| **OpenRouter key**     | Your organization | OpenRouter bills you directly     |

A single family can mix managed and bring-your-own-key providers under Uptiq AI Gateway.

{% hint style="warning" %}
OpenRouter chooses the upstream provider itself, so you don't control which one serves a request or where it runs. Where region residency matters, use Uptiq AI Gateway with your own key against your own provider tenancy instead.
{% endhint %}

## Model tiers

An application requests a **tier**, not a model name. The tier resolves to whichever model the family currently maps to it.

This is the point of the whole arrangement. An administrator can move the Smart tier from one model to a newer one, and every agent that asks for Smart picks up the change — no agent is edited, and no model name is hard-coded anywhere.

{% columns %}
{% column %}

#### Economy

Routing, classification, extraction, and reranking. Prioritizes speed and cost for high-volume work.
{% endcolumn %}

{% column %}

#### Smart

Synthesis, specialist tasks, reports, and drafts. The balanced choice for most agents.
{% endcolumn %}

{% column %}

#### Premium

The hardest reasoning. Prioritizes quality over latency and cost.
{% endcolumn %}
{% endcolumns %}

{% hint style="warning" %}
Nothing stops you from mapping all three tiers to the same model, and the product doesn't warn when you do. Choose distinct models where you want a real difference in cost or capability.
{% endhint %}

## How a request routes

```
Application request
  → named family, or the default family
  → Economy, Smart, or Premium tier
  → the model mapped to that tier
  → the family's gateway
  → an eligible provider
  → model response
```

A tier that maps to a model whose provider isn't configured fails at request time. Confirm availability in [Model Catalog](/control-center/ai-gateway/model-catalog.md) before you assign a tier.

## Native on Cloud

Native on Cloud keeps model hosting and inference inside a cloud tenancy your organization controls. Route through GCP Model Garden, Google Agent Platform, or Azure OpenAI where the deployment must make no calls to public AI APIs.

Region is set on the provider credential rather than centrally in the gateway, because it's the provider resource that's region-bound — an Azure OpenAI endpoint belongs to the region its resource was created in, and a GCP credential carries its project and region.

For how this works in a bank-owned deployment, see [Security FAQ](/control-center/detailed-security-and-runtime-faq.md).

## Why this matters

* **Configuration is per family.** Families are enabled, authenticated, and tier-mapped one at a time.
* **Applications ask for a tier.** Change the model behind a tier without touching an agent.
* **The provider decides where inference runs.** Choose it deliberately when region matters.
* **One family is the default.** It serves every request that doesn't name one.

## Related

<table data-view="cards"><thead><tr><th>Title</th><th>Description</th><th data-card-target data-type="content-ref">Link</th></tr></thead><tbody><tr><td><strong>Gateway Settings</strong></td><td>Enable families, authenticate providers, and map tier models.</td><td><a href="/control-center/ai-gateway/gateway-settings.md">Gateway Settings</a></td></tr><tr><td><strong>Model Catalog</strong></td><td>Check which models and providers are available before assigning a tier.</td><td><a href="/control-center/ai-gateway/model-catalog.md">Model Catalog</a></td></tr><tr><td><strong>Credit Usage</strong></td><td>See what managed-key usage draws from your credit balance.</td><td><a href="/control-center/cost-control/credit-usage.md">Credit Usage</a></td></tr><tr><td><strong>Security FAQ</strong></td><td>Where the runtime and its data sit in a bank-owned deployment.</td><td><a href="/control-center/detailed-security-and-runtime-faq.md">Security FAQ</a></td></tr><tr><td><strong>Glossary</strong></td><td>Look up family, provider, gateway, tier, and credential terms.</td><td><a href="/start-here/glossary.md">Glossary</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.uptiq.ai/control-center/ai-gateway/how-model-routing-works.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
