From 16c4374f7a14ab4b405b42eef4845ac5f147ac1b Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 23 Jan 2025 11:34:14 -0800 Subject: [PATCH] refactor: lowercase model names for fuzzy matching while preserving original case --- aider/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aider/models.py b/aider/models.py index a75d604ce..bf99e1e43 100644 --- a/aider/models.py +++ b/aider/models.py @@ -1349,6 +1349,7 @@ def fuzzy_match_models(name): chat_models = set() for model, attrs in litellm.model_cost.items(): + # it's fine to lowercase for fuzzy searching, but we need to return the original case version ai! model = model.lower() if attrs.get("mode") != "chat": continue