Route Profile
A route profile is a JSON file that controls how the inference router selects between models. The router computes a weighted score from prompt features and compares it against a threshold.
Schema versions
Two schema versions are supported. Version 2 adds additional prompt-analysis features.
v1
{
"schema_version": 1,
"bias": 0.0,
"weights": {
"token_count": 0.3,
"question_mark": 0.2,
"code_marker": 0.25,
"tool_hint": 0.25
}
}
v2
{
"schema_version": 2,
"bias": 0.0,
"weights": {
"token_count": 0.15,
"question_mark": 0.10,
"code_marker": 0.15,
"tool_hint": 0.15,
"prompt_length_bucket": 0.15,
"reasoning_chain_depth": 0.15,
"natural_language_ratio": 0.15
}
}
Fields
| Field | Type | Description |
|---|---|---|
schema_version | int | 1 or 2 |
bias | float | Constant added to the score before threshold comparison |
weights.token_count | float | Weight for normalized token count |
weights.question_mark | float | Weight for presence of question marks |
weights.code_marker | float | Weight for code-related markers (backticks, keywords) |
weights.tool_hint | float | Weight for tool-use indicators |
weights.prompt_length_bucket | float | (v2) Weight for prompt length category |
weights.reasoning_chain_depth | float | (v2) Weight for detected chain-of-thought depth |
weights.natural_language_ratio | float | (v2) Weight for ratio of natural language to structured tokens |
The default classification threshold is 0.55. Scores above the threshold
route to the higher-capability model; scores below route to the faster model.
Override the threshold with router.threshold in runtime.toml.