Escalate
When the active model cannot solve a task — repeated failed attempts, a hard domain problem, quality clearly blocked by model capability — the agent can temporarily switch to a stronger deployed model for a limited number of turns, then revert automatically.
The upgrade target is not a guess: candidates are ranked with benchmark data
served by the models endpoint — an overall intelligence index, per-domain
capability indexes (finance, legal, engineering, economics, ...) and
per-evaluation agentic scores. Models that score at least gain_threshold
points better than the current model on the relevant domain are eligible; the
best scorer wins (cheapest on ties).
Areas
Ranking is area-aware. The agent picks the area matching the task (or the tool
infers it from the free-text reason):
| Area | Scores models on |
|---|---|
general | Overall intelligence index (default) |
agentic | SRE/ops agents, analyst agents, Terminal-Bench |
coding | SciCode, Terminal-Bench 2.1/4.0 |
math | CritPt, Humanity's Last Exam, GPQA |
science | GPQA, Humanity's Last Exam, SciCode evals |
longcontext | Long-context reasoning evals |
legal | Legal capability index, HarveyLab |
finance | Finance & accounting index, Tau Banking |
economics | Economics index, GDPval |
engineering | Engineering index, SRE bench |
strategy | Strategy & ops index, GDP.pdf pass rate |
medical | Healthcare & medical index, Omniscience |
Examples: a failing TypeScript refactor escalates with area: "coding", a
contract review with area: "legal", an integral proof with area: "math".
Regional edge case
A session pinned to a regional model (model id ending in __regional, served
from the AU/EU/US in-region pools) can only escalate to models available in
that same region. The tool resolves candidates to their <id>__regional
variant and silently skips models without one — a regional session can never
route work to a global-pool model. Global sessions prefer the global pool.
Enable
Escalate is available in two ways:
- Perk toggle (recommended) — turn on the
escalateperk for the project, the same way you enable computer-use or cloud hand-off. All defaults apply (see below). - Explicit config — add an
escalatesection totfcode.jsonto control the knobs:
{
"escalate": {
"enabled_for": ["build", "tf_engineer", "tf_orchestrate"],
"endpoint": "https://ai.toothfairyai.com/models_list",
"area": "general",
"gain_threshold": 5,
"turns": 3,
"api_key": "optional-if-endpoint-needs-auth"
}
}
enabled_for— Agents allowed to escalate (default:build,tf_engineer,tf_orchestrate). Also accepts perk names.endpoint— Models endpoint exposing deployed model benchmark data (e.g.https://chat.host/v1/modelsor amodels_listURL). Defaults to envTF_MODELS_URL. Two shapes are accepted: an OpenAI-style{data: [...]}array where each entry nests benchmark data undertoothfairy, or amodels_list{templates: {...}}object.area— Default ranking area when the tool call omits one (default:general).gain_threshold— Minimum score improvement over the current model required to escalate (default:5).turns— Escalation budget in assistant turns before auto-revert (default:3).api_key— Bearer token sent to the endpoint if it requires auth.
The catalog is cached for 6 hours (override the cache file location with env
TF_ESCALATE_CACHE); a stale cache is still used if the endpoint is
unreachable.
Agent experience
The tool exposes two actions:
action: "escalate"(default) — withreasondescribing what the current model cannot do and optionallyarea. Responds with the chosen model, its tier and area scores.action: "revert"— switch back to the original model immediately.
Escalation state is per-session and in-memory: a restart drops any active
escalation. Each new user prompt consumes one budget turn; when the budget is
exhausted the session reverts to the original model automatically. Escalating
requires the escalate permission (auto-allowed by default).