Virtual Model Aliases

Virtual Model Aliases make it easy to manage and optimize amongst multiple LLMs without changing your code.

Overview

Virtual Model Aliases in FastRouter.ai let you easily group several models and providers under a single alias. You can reference the alias in your API calls by passing the alias name to the model parameter. FastRouter will then automatically select and route requests to one of the configured models—according to the selection strategy you specify.

This feature maximizes flexibility, reliability, and efficiency when deploying LLMs across different providers or model versions.


How It Works

You can create a Virtual Model Alias by selecting models and providers, assigning weights (if needed), and choosing an automatic selection strategy. On each request, FastRouter will pick from the configured options automatically—and fall back to another model in the list if the primary one fails.

Use Cases:

  • A/B testing: Seamlessly test multiple models/providers.

  • Resilience: Automatic fallback if a provider or deployment is unavailable.

  • Optimization: Route requests for the best speed, price, or usage.


Selection Strategies

When configuring your Virtual Model Alias, you can specify how FastRouter should select models for each request:

Available Strategies:

  • Random Shuffle Each request is sent to a randomly selected model in your list, according to the weights you assign. Useful for A/B tests or spreading traffic evenly.

  • Lowest Latency Automatically selects the model with the fastest current response time, ensuring minimum wait time for end-users.

  • Highest Throughput Picks the model/provider combination that can process requests at the highest rate, ideal for high-volume applications.

  • Lowest Usage Prioritizes models with the least usage, helping to balance load and prevent hitting usage or rate limits.

  • Lowest Price Routes requests to the least expensive model in the list, optimizing for cost savings.


Built-in Automatic Fallback

If a model/provider fails or is unavailable, FastRouter will transparently send the request to the next candidate in your list, according to your selected strategy—ensuring maximum reliability.


Getting Started

Select Models
Finalize Details & Strategy
  1. Go to the Virtual Models section in FastRouter.

  2. Click on Create Virtual Model Alias.

  3. In the Select Models screen, select one or more models to be referenced in your alias and click on Next.

  4. In the Finalize Details & Strategy, enter a virtual model alias name.

  5. Choose the Projects that have access to this alias and the Strategy for model selection.

  6. Select the providers you want to include for a model and assign weights (for strategies like Random Shuffle that use them).

  7. Click Create Alias.

You can then reference this Virtual Model Alias in your API calls by specifying its name in the model parameter.

Last updated