Skip to content

Commit

Permalink
fix: Handle missing litellm_provider in fuzzy model matching
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-gauthier committed Nov 15, 2024
1 parent b254afa commit d4d5d15
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aider/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,10 @@ def fuzzy_match_models(name):
model = model.lower()
if attrs.get("mode") != "chat":
continue
provider = (attrs["litellm_provider"] + "/").lower()
provider = attrs.get("litellm_provider", "").lower()
if not provider:
continue
provider += "/"

if model.startswith(provider):
fq_model = model
Expand Down

0 comments on commit d4d5d15

Please sign in to comment.