feat: Adapt SeniorCoder to use Model.junior_model

This commit is contained in:
Paul Gauthier (aider) 2024-09-25 11:04:34 -07:00
parent e74e76e51c
commit a4aa88a440

View file

@ -16,8 +16,12 @@ class SeniorCoder(AskCoder):
return
kwargs = dict()
kwargs["main_model"] = Model(self.main_model.junior_model_name)
kwargs["edit_format"] = self.main_model.junior_edit_format
# Use the junior_model from the main_model if it exists, otherwise use the main_model itself
junior_model = self.main_model.junior_model or self.main_model
kwargs["main_model"] = junior_model
kwargs["edit_format"] = junior_model.edit_format
kwargs["suggest_shell_commands"] = False
kwargs["map_tokens"] = 0
kwargs["total_cost"] = self.total_cost