refactor: Update model switching to preserve weak model configuration

This commit is contained in:
Paul Gauthier 2025-02-06 13:43:58 -08:00 committed by Paul Gauthier (aider)
parent b61e527baa
commit ddeb43783c

View file

@ -81,7 +81,7 @@ class Commands:
"Switch to a new LLM"
model_name = args.strip()
model = models.Model(model_name)
model = models.Model(model_name, weak_model=self.coder.main_model.weak_model.name)
models.sanity_check_models(self.io, model)
raise SwitchCoder(main_model=model)