Automatic model selection in AI Gateway uses model router from Microsoft Foundry to rank the models behind a model alias for each request. The gateway combines that ranking with the alias's priorities and weights to select a backend, while its access controls, policies, and telemetry continue to apply.
Choose Balanced, Quality, or Cost as the selection mode. With Model first, the gateway selects the best-fit model across priority groups. With Priorities first, it selects only from the highest-priority group. Weights split traffic among backends for the selected model.
Backends can be Foundry or Azure OpenAI deployments, provider-hosted models, models on other clouds, or your own OpenAI-compatible endpoints. Each backend must run a model supported by model router.
Learn more.