From 2a80d9c555ef2ed9861205ae126eab8ccdc43d87 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 19 Nov 2024 10:02:25 -0800 Subject: [PATCH] feat: Apply generic model settings when no exact model match found --- aider/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aider/models.py b/aider/models.py index d6f45671c..c91ffad7e 100644 --- a/aider/models.py +++ b/aider/models.py @@ -850,14 +850,20 @@ class Model(ModelSettings): self._copy_fields(self.default_model_settings) # Look for exact model match + exact_match = False for ms in MODEL_SETTINGS: # direct match, or match "provider/" if model == ms.name: self._copy_fields(ms, skip_name=False) + exact_match = True break # Continue to apply overrides model = model.lower() + # If no exact match, try generic settings + if not exact_match: + self.apply_generic_model_settings(model) + # Apply override settings last if they exist if self.override_model_settings: self._copy_fields(self.override_model_settings)