How capability routing picks a model for your request

ToRun Team · Replies: 0 · Views: 2

How capability routing picks a model for your request

ToRun does not assign you a single model. Every request goes through a routing pipeline that matches what your task actually needs to the best available model at the best price. Here is how it works.

The routing pipeline

  1. Mode determines the capability set. When you open a Chat session, start an Image generation, or run a Research task, ToRun maps that product mode to a set of required capabilities — for example, a vision-enabled chat needs text + vision; a code-execution task needs text + code_execution. Capabilities include text generation, vision, tool use, structured output, image generation, audio in/out, video generation, embeddings, reranking, web search, reasoning, batch processing, realtime streaming, and fine-tuning.

  2. The catalog is filtered to models that satisfy every required capability. If a model does not support even one capability in the set, it is excluded entirely. The remaining candidates span multiple providers — OpenAI, Anthropic/Claude, Google/Gemini, DeepSeek, xAI/Grok, Mistral, and others — so ToRun is never locked to one vendor.

  3. Surviving candidates are ranked by price and quality. By default, ToRun sorts cheapest-first so your wallet or subscription allowance goes further. Workflow runners flip this to quality-first automatically, because automation tasks benefit from fewer retries.

  4. The top-ranked model is selected and the request is dispatched. If that provider returns an error or is unreachable, the fallback chain advances to the next candidate in the ranked list. No manual intervention required.

How to influence routing

  • Prefer quality: In chat settings you can switch from the default cheapest-first ordering to quality-first. ToRun re-sorts the candidate list by quality score descending. You still get capability-matched models — just the better ones at the top.
  • BYOK: If you have added a provider API key to your vault, ToRun can route through your own account for the supported models. This affects both which models appear in the candidate list and how costs are calculated.
  • Capability signals from your input: Attaching an image to a chat automatically adds the vision capability requirement, narrowing the candidate list to vision-capable models only.

Why a request might route to a provider you did not expect

A provider is chosen because it is the highest-ranked candidate that satisfies every required capability at the moment of the request. If your usual provider is down, degraded, or does not support a capability your task requires, the fallback chain picks the next best match. The billing record captures which model was used, at what rate, and when — so you can always see the exact routing decision after the fact.

Read-only on the public site
Open in the app