Skip to main content
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

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.
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.

Limits

Mappings are cached for about a minute.