From baa13351a6193992ee8d20c4639be643278ad3bc Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 23 Nov 2024 12:57:24 -0800 Subject: [PATCH] refactor: Improve model registration and settings handling --- aider/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aider/models.py b/aider/models.py index dd608bb45..66ce2df0d 100644 --- a/aider/models.py +++ b/aider/models.py @@ -935,10 +935,11 @@ class Model(ModelSettings): and ("2.5" in model or "2-5" in model) and "32b" in model ): - "openrouter/qwen/qwen-2.5-coder-32b-instruct", self.edit_format = "diff" self.editor_edit_format = "editor-diff" self.use_repo_map = True + # if "ollama" in model: + # self.extra_params = dict(num_ctx = 64*1024) return # <-- # use the defaults @@ -1101,6 +1102,9 @@ def register_models(model_settings_fnames): if not os.path.exists(model_settings_fname): continue + if not Path(model_settings_fname).read_text().strip(): + continue + try: with open(model_settings_fname, "r") as model_settings_file: model_settings_list = yaml.safe_load(model_settings_file)