I ran a relatively simple mechanism for freely selecting model routing locally. After running it for a while, I felt that it was still useful and could be further polished. Especially when there are long and complex tasks, it is a good way to dynamically select models based on complexity. Agents and people who use the model should be familiar with the characteristics, strengths, weaknesses, costs, and new features of each model. The mechanism is roughly as follows:
1. Tasks are first scored according to complexity, reversibility, verifiability, context size, and user impact. 2 Use tools first if they can be solved with tools, such as rg, scripts, tests, lint, schema validation, and API readback. 3 Verifiable search, extraction, formatting, and file inspection take the mini/low-cost route.
4. Partial code modifications and document rewriting are carried out in the medium model or the current main agent. Only upgrade to high inference models for architectural risks, high impact releases, permission/production/money related, low verifiable judgments.
5. Every time you bypass the baseline of "full high configuration model", write the estimated difference to: ***/.goal-router-state/*/savings-ledger.json
