Choosing Models on a Provider
On the provider’s Models tab, every request must match an allow entry and must not match a block entry. An empty allow list denies all traffic. A key cannot sit on both lists.
* matches every model key. Typed providers (OpenAI, Anthropic, Google Gemini, Vertex AI, Amazon Bedrock, Microsoft Foundry) show Known Models from the catalog. OpenRouter, Vercel AI Gateway, and Custom skip that list; enter custom keys or patterns.
Allow vs Block
Allow is the positive set. Block subtracts even when allow matched. Allow* and block gpt-4o-mini to permit every key except that one. Allow gpt-* and leave block empty to permit only keys that start with gpt-.
Model Discovery
GET /v1/models is answered from these lists plus the catalog. The gateway does not proxy that listing call upstream.
- Exact allow keys are listed as themselves.
- Patterns expand against the catalog for typed providers (
claude-*becomes every matching catalog id). - On OpenRouter, Vercel AI Gateway, and Custom, add exact allow keys to make those models show up in discovery. A wildcard still matches at request time.
Inherit vs Select
On an AI Gateway resource, attach providers from the AI Gateway settings tab. Each attachment has an access mode:
The same provider can be inherited on one resource and selected on another. You can disable an attachment without removing the provider.
Select only offers models already on the provider’s allow list. Use inherit when every resource should see the same keys. Use select when one gateway should expose a narrower set (for example a public resource with
gpt-4o only, while the provider still allows gpt-*).
Provider Selection
When a resource has more than one attached provider, the gateway picks one per request. Overlapping allows are allowed at save time. Collisions are resolved, or rejected, when the request arrives. Steps, in order. Later steps run only while more than one candidate remains:- Capability. The path must match a capability the provider advertises.
- Allow and block. The effective lists (inherit or select) must pass.
- Specificity. The most specific matching allow wins: exact keys beat patterns, fewer wildcards win, longer literals win.
gpt-4obeatsgpt-*beats*. - Catalog ownership. A typed provider whose catalog contains the id beats an aggregator that also allows it.
- Class. Native typed providers beat aggregators (OpenRouter, Vercel AI Gateway), which beat Custom.
- Ambiguous. If more than one distinct provider remains, the gateway returns
403withModel "<id>" is ambiguous across multiple AI providers on this resource.
*, or two aggregators both allowing * with no native owner on the resource.
GET /v1/models skips steps 3-6. There is no requested model to disambiguate, so the gateway returns the union of what every attached provider advertising Anthropic Models would accept.
Examples
OpenAI + Anthropic, both*. POST /v1/chat/completions with gpt-4o goes to OpenAI. Anthropic never reaches scoring; capability alone decides. POST /v1/messages with a Claude model goes to Anthropic.
OpenAI + OpenRouter, both *. gpt-4o on Chat Completions matches both. Specificity is a tie (* vs *). Catalog ownership sends it to OpenAI.
Two OpenAI providers, both *. Capability, lists, specificity, catalog, and class all leave both candidates. Result is the ambiguous error. Narrow at least one allow list, disable one attachment, or split them across resources.
