> ## Documentation Index
> Fetch the complete documentation index at: https://gomodel-docs-benchmark-writeup-and-tooling.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Virtual Models

> Use GoModel virtual models to expose stable model names and test model swaps without changing app code.

<img src="https://mintcdn.com/gomodel-docs-benchmark-writeup-and-tooling/p9zct3CMxvQRFcaC/features/virtual-models.png?fit=max&auto=format&n=p9zct3CMxvQRFcaC&q=85&s=fb184a7305d6dbf1e2b6e94e0be6b6ab" alt="GoModel dashboard models page with the New virtual model button and an active redirect row" style={{ width: "100%", maxWidth: "1280px", height: "auto" }} className="rounded-lg" width="1600" height="636" data-path="features/virtual-models.png" />

## What virtual models do

A virtual model is a model you define, instead of one a provider advertises.
GoModel picks the kind from whether you give it a target:

* A **redirect** (an alias) is a stable name that points to a concrete provider
  model. Your app sends the name in the `model` field, and GoModel resolves it
  before sending the request upstream.
* An **access policy** has no target. It gates an existing model selector by
  `user_path` — or disables it entirely — without adding a new name. See
  [User Path](/features/user-path#model-access) for access control.

Create and manage both in the admin dashboard at `Models -> New virtual model`.
Fill **Target model** to make a redirect; leave it empty to make an access
policy on the **Source** selector.

The rest of this page covers redirects.

## Use stable names

You can expose names like `regular` and `smarter` instead of provider-specific
model IDs.

* `regular` -> `anthropic/claude-sonnet-4-6`
* `smarter` -> `anthropic/claude-opus-4-6`

Your app can then send:

```json theme={null}
{
  "model": "regular",
  "messages": []
}
```

## Expose only redirects

To hide provider models from `GET /v1/models`, set:

```env theme={null}
KEEP_ONLY_ALIASES_AT_MODELS_ENDPOINT=true
```

When this is enabled, GoModel returns enabled redirects from `/v1/models`
instead of the full provider model list. The setting is also listed in
`.env.template`.

## Shadow a model

A redirect can "shadow" a model by using the same name as an existing model and
pointing it somewhere else. This lets you override a requested model without
changing application code.

For example:

* source: `anthropic/claude-opus-4-6`
* target model: `anthropic/claude-sonnet-4-6`

Your app can keep sending `anthropic/claude-opus-4-6`, while GoModel routes the
request to `anthropic/claude-sonnet-4-6`.

## A/B testing

Redirects are useful for short model experiments. Move a redirect from one
target to another, then compare app behavior, latency, and usage.

For example, point `smarter` at Opus for one test and Sonnet for another. You can
also shadow `opus-4-6` with `sonnet-4-6` to check whether the same app flow still
works.
