refactor: lowercase model names for fuzzy matching while preserving original case

This commit is contained in:
Paul Gauthier 2025-01-23 11:34:14 -08:00 committed by Paul Gauthier (aider)
parent 05a77c7406
commit 16c4374f7a

View file

@ -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