> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nemu.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Mappings

> Rename a model without touching your code

A mapping rewrites the model name in a request before anything else happens. It
points an application at a different model without redeploying it.

The usual case: something hardcodes `gpt-4o` and you want that traffic served by
whatever you have decided is best this month.

## Fields

| Field          | Notes                                        |
| -------------- | -------------------------------------------- |
| Source pattern | What the caller sends                        |
| Target model   | What it becomes                              |
| Priority       | 0 to 1000, higher is evaluated first         |
| Pattern        | On for glob matching, off for an exact match |

`auto` and a bare `*` are rejected as sources, since both would swallow
everything.

## Globs

One wildcard, `*`, matching any run of characters. `openai/gpt-*` catches
`openai/gpt-4o` and `openai/gpt-4o-mini`.

Character classes and braces are not special.

## Which one wins

An **exact** mapping always beats a pattern, whatever the priorities say.

Between patterns the most **specific** wins, measured by how much of the pattern
is literal text rather than wildcard, so `openai/gpt-4*` beats `openai/*`.

Priority breaks ties by being evaluated first.

## Cycles

A mapping that eventually points back at itself is rejected when you create it,
along with a duplicate source name.

<Warning>
  Those checks run on create only. Editing an existing mapping can introduce a
  cycle that creating it would have refused, so change a live mapping's source
  or target carefully.
</Warning>

## Limits

| Free | Starter | Pro | Max | Enterprise |
| ---: | ------: | --: | --: | ---------: |
|    3 |      25 | 100 | 500 |  unlimited |

Mappings are cached for about a minute.
