Rename agent/route to agent/model and make its result a complete
ModelSelection, so each step fixes its provider, model, and reasoning
effort before prompt preparation, agent/pre-step, tool conditions, and
every request attempt. agent/request may change only sampling controls;
returning another provider, model, or reasoning effort fails the step.
installModelSelection installs one agent/model listener and
ModelSelectionRef drops assembled. The pre-step payload, AssembleContext,
and ToolActivationContext carry modelSelection. Webhook initial
selection and the CLI mock effort switch move to agent/model.
- Add the agent/route waterfall, dispatched once per proposed step before
system-prompt/prepare and agent/pre-step; model selection captures its
choice there, and a later selection applies from the next step.
- Pass the chosen StepRoute to prompt preparation and assembly, the
agent/pre-step payload, and tool conditions; remove Agent.currentRoute().
- Run agent/request and prepareCall() for each attempt after step/start and
prompt assembly; agent/request may change only call controls, and another
provider or model fails the step.
- Resolve conditional tools and assemble the prompt once per step; retries
reuse the route, tool set, and rendered assembly.
- Update documentation, Agent Notes, generated catalogs, tests, and the
cordis-inspect-jsdoc snapshot.