Routing

What happens between your request and an answer

最后更新:

You send a model name, or a route like auto/image. Somewhere in between, four things happen in a fixed order. Knowing the order explains most of the behaviour people find surprising.

The four steps

1
Read the task. The request carries either a specific model id, or an auto/ route that describes the modality rather than naming a model.
2
Match capability. Candidates get filtered to those that can actually do the job. A 1M-token document rules out anything with a smaller window. A request that passes tools rules out models without tool calling. Attached images rule out anything without vision.
3
Prefer free. Among the survivors, models with free quota still available are tried first. A paid model is only reached when no free candidate fits the task.
4
Fall back on failure. A rate limit, an exhausted quota, or a rejected key moves the request to the next candidate.

Why step 4 is the one that matters

Steps 1 to 3 are conveniences. Step 4 is the difference between a demo and something you can leave running.

Any single provider fails often enough that a workload with real traffic needs a fallback path. Quotas refill on the provider's schedule, not yours. Keys get rotated or revoked. A model gets deprecated with a few weeks' notice. If your application talks to one provider directly, every one of those events is an outage you have to notice, diagnose, and fix by hand.

With a gateway in between, they become a log line. The request still returns an answer, and the log tells you the original choice was skipped and why.

Choosing a route instead of a model

A specific model id is a decision you made once and then stopped revisiting. Model quality moves, prices move, and free quotas appear and disappear. A route is a decision you describe once and let the router keep making.

If the request needsSend
An imageauto/image
Videoauto/video
Speech synthesisauto/tts
Speech recognitionauto/asr
Embeddingsauto/embed
Rerankingauto/rerank

A route is not a guarantee about which model you get. It is a guarantee about what the router optimises for. See the full list at Models.

What gets logged

Every routed request writes an entry you can read in the console: which route or model was requested, which provider actually served it, which candidates were skipped, and the reason for each skip. That log is why "why did this call cost more than I expected" has an answer rather than a guess.

A request, step by step

The four steps above are the shape of it. This is the same sequence at the level of the individual checks, in the order they run.

  1. Step 1: Resolve the name. A specific model id maps to one provider entry and skips the rest of the choice. An auto/ route expands into the candidate set that matches its modality: 6 of the 199 listed entries are modality routes, which is 3% of the catalogue.[1]
  2. Step 2: Filter by what the request needs, hardest constraint first. A context window smaller than the request cannot serve it at all, so that is checked first. The modality comes next: an image request is only served by image models, a transcription only by speech-to-text models. Each filter removes a different slice of the list, and the modality removes the largest.
  3. Step 3: Order what survives. Free quota sorts to the front, then the weighting the route asks for — cost, speed, or uptime. A route that weights uptime puts providers with a clean recent record ahead of cheaper ones.
  4. Step 4: Send to the head of the list and read the response. A normal answer ends the request here. A rate limit, an exhausted quota, an authentication rejection or a timeout removes that candidate and control returns to the list.
  5. Step 5: Write the log entry: the route or model that was requested, the provider that actually served the call, the candidates that were skipped, and the reason for each skip.

What makes the router skip a candidate

Failures are not one thing. Each signal below is handled differently, and conflating them is how a fallback path turns into a retry storm.

What came backWhat the router does
A rate limit, or an error naming a request cap Treats the candidate as temporarily unusable and moves to the next one straight away.
Quota exhausted Keeps the model callable but stops preferring it, until the provider refills or the promotion ends.
A rejected key, or a permission error Drops that candidate for the request and marks the credential, so the same key is not tried again on the next call.
No response, or a stream that never starts Counts as a failure and tries the next candidate. A stream that has already delivered a first token is not restarted.
The model is absent from the provider's own list Removes the entry from the pool rather than retrying it — a model that no longer exists will not start existing on the second attempt.

The reason is recorded per skip, which is what makes the log readable later. Without it, "the answer came from somewhere else" and "the answer cost more than the list price" are the same unexplained event.

What routing does not decide

Routing FAQ

What happens to my request when a provider rate-limits me?
It continues on the next candidate and you receive an answer as usual. The rate-limited provider is recorded as skipped, with the limit as the reason. Nothing is retried against that provider inside the same request.
Why did I get a paid model when free ones exist?
Free capacity is an allowance the provider grants, so the router prefers entries that still have some, but only among models that fit the task. If every free candidate fails the capability filter or its quota is spent, the request reaches the paid tier. To keep it on the free side, send fm-v1-lite, the free tier: any account can call it, and it needs no subscription.
Can I see which model actually answered?
Yes, after the fact. The response is what it is, but the routing log names the provider that served it and every candidate that was passed over. If you need the model name up front rather than in retrospect, send a specific model id and the routing decision disappears.
Does failover change what a call costs?
It can. A request that was going to run on free quota may end up on a paid model when that quota is exhausted, and a fallback to a more capable model costs more than the first choice would have. The price list follows the model that ran, and the log tells you which one that was.
Do I need to send a route at all?
No. A specific model id is a perfectly good request and it disables almost all of this. Routes exist for the case where model quality, price and free quota all move, and you would rather describe the work than keep re-picking a winner.

Next

Sources

Every third-party figure quoted on this site was read from the vendor documentation linked below, on the date stated. None of these links are affiliate links and none of these vendors paid to be listed. If a number here disagrees with the page it came from, the page is right — tell us and it gets corrected.

Where the percentages come from

Every share quoted on this site is counted from the live model list, not estimated. Divide the two counts in the last column, round to the nearest whole percent, and you get the number in the first.

ShareOf whatCount
77%are chat models153 of 199 listed entries
9%generate images18 of 199 listed entries
23%are not chat models46 of 199 listed entries
3%are modality routes6 of 199 listed entries
17%carry a context length34 of 199 listed entries

[1] Counted on 29 September 2026 from GET https://freemodel.online/v1/models, which needs no key and no account. Every row uses all 199 listed entries as the denominator, because the only thing the endpoint states for every entry is its modality. It no longer publishes per-model capability flags such as tool calling or reasoning, so this site quotes no shares for them. Fetch the list and recount whenever you want to check the arithmetic.