Skip to main content
Back

Smart Routing

PilotDeck Agent Series

1. Overview​

Intelligent routing selects an appropriate model for each round of requests based on the complexity of the task: simple tasks are handed over to fast and low-cost models, and complex tasks can use models with strong capabilities to ensure task effects while reducing unnecessary token consumption.

Key concepts

conceptfunction
decision modelDetermines which task level the current request belongs to, and is mainly responsible for classification
task levelDescribe tasks of varying complexity
Default levelThe level used when the task level cannot be explicitly matched
hierarchical modelA model that performs tasks at this level
subagent strategyDetermine whether the sub-agent task should re-judge the task level
model pricingUsed to estimate the calling costs incurred by different models

PilotDeck’s four preset task levels

Hierarchysuitable task
SimpleQuick Q&A, confirmation, light rewrite and simple file operations
MediumSingle tool call, short text generation, minor file modifications, and general code changes
ReasoningMulti-file analysis, long context, data analysis, research and deep reasoning tasks
ComplexWork that needs to be split or handed over to multiple sub-agents for parallel processing

2. Use​

2.1 Configure Routing Model​

Configure smart routing in "Settings → Agent → Routing".

  1. Prepare model

    In "Settings → Model Pool", add the models to be used by routing. It is recommended to prepare at least 2 models.

    Model pool page in settings to add model providers and manage enabled models

  2. Enable routing

    Go to "Settings → Agent → Routing" and turn on "Enable Smart Routing".

    On the routing settings page, the red box marks the enable smart routing switch.

    **Note:**When smart routing is turned off, the main agent will directly use the model selected in the current dialogue. The sub-agents inherit the main agent model by default and support switching to other models.

  3. Choose a decision model

    In Routing Model, select a model for Decision Model. The decision model needs to quickly understand the request and determine the complexity. You can usually choose a model that is faster, less expensive, and has basic command understanding capabilities.

  4. Assign models to the task hierarchy

    Select execution models for the four task levels of Simple, Medium, Reasoning and Complex respectively. You can refer to the following configuration ideas:

    HierarchyRecommended configuration ideas
    SimplePrioritize models with fast response and lower price
    MediumChoose a model with stable tool invocation and general content generation capabilities
    ReasoningChoose models with long context, strong analysis and reasoning capabilities
    ComplexChoose a model suitable for mission planning and subagent collaboration

    When selecting a model, you need to confirm whether the model has the ability to perform tasks, such as image input, tool calling, and sufficient context length.

    Routing model configuration, including decision model, Simple, Medium, Complex and Reasoning, Medium is marked as the default level

    Click next to a level**"Set as default"**, this level is used when the task level cannot be determined. Medium can often be set as the default tier to strike a balance between cost and capability.

2.2 Initiate a Task​

After the configuration is completed, change the model in the lower right corner of the dialog box to "Automatic" to use the routing policy to perform tasks.

The model selector in the lower right corner of the dialog input box, the red box marks the automatic option

2.3 View Routing Results​

Click "Explore → Routing" in the upper right corner to open the routing dashboard and view routing usage, which mainly includes:

datameaning
Number of requestsNumber of model requests processed by the router
Number of TokensInput and output tokens generated by model calls
CostEstimated call cost based on model pricing
sessionMaster agent, subagent and model usage per session
Recently calledThe time, project, supplier, model and number of tokens used by the most recent request

The cost area also compares the "actual cost" and the "cost without Router". The "cost without Router" is an estimate assuming that all routing tokens are handed over to the main model.

You can switch "Project" or "Total" to view the usage of the project or the overall route.

3. Advanced Settings​

Ordinary users can start using it after completing the configuration of the judgment model and models at each level. If further adjustments are needed, you can**"Settings → Agent → Routing"Expand in center"Advanced Settings"**。

3.1 Sub-Agent Strategy​

PilotDeck supports two types of sub-agent strategies:

  • judge: Each sub-agent task will determine the task level and select the corresponding model;
  • skip: The sub-agent no longer re-judges, and the "sub-agent model" is fixed. At this time, the sub-agent model needs to be set.

3.2 Task Level Definition​

Click next to the task level definition**"Edit"**, modify the level name and description, or add a custom level. Level description is an important basis for determining model classification. It should clearly explain which tasks the level is suitable for processing. After adding a task level, you need to configure the execution model for the task level in the "Routing Model" above.

Task level definition panel, showing descriptions of four preset levels and edit and add buttons

3.3 Model Pricing​

Model pricing is used to calculate cost data in routing dashboards. You can set input, output, and cached read prices for each model, and choose USD or CNY as the display unit.

Model pricing panel, set input, output and cache prices by model, example unit is USD per million Tokens

Routing configuration (old version interface demo)

The following demonstration follows the old official website, and the interface may be different from the current version; please refer to the latest steps and screenshots on this page.

Intelligent routing configuration playback

Intelligent routing configuration playback

Developer Showcase

View all →