fix(commands): remove unintended config mutation in SwitchModel
SwitchModel should only update the routed agent's runtime Model field. Writing to cfg.Agents.Defaults.ModelName was a behavioral change that corrupts the default agent config when switching a non-default agent. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
75f1b58ca0
commit
d248c91611
1 changed files with 0 additions and 3 deletions
|
|
@ -1532,9 +1532,6 @@ func (al *AgentLoop) buildCommandsRuntime(agent *AgentInstance) *commands.Runtim
|
|||
rt.SwitchModel = func(value string) (string, error) {
|
||||
oldModel := agent.Model
|
||||
agent.Model = value
|
||||
if al.cfg != nil {
|
||||
al.cfg.Agents.Defaults.ModelName = value
|
||||
}
|
||||
return oldModel, nil
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue