Switch the active model on a CodeagentClient, preserving history
Source:R/model_switch.R
switch_model.RdTries Route A (in-place provider swap); falls back to Route B (rebuild + migrate turns) if the in-place swap fails. The returned client always has the full conversation history and re-registered tools.
Arguments
- client
A
CodeagentClientfromcodeagent_client().- model
Character. New model spec/alias (see
.resolve_model_chat()).