Skip to content

fix(models): skip non-dict litellm model_cost entries (#5537) - #5701

Open
FOWEPJF255 wants to merge 1 commit into
Aider-AI:mainfrom
FOWEPJF255:fix/fuzzy-match-models-list-attrs-5537
Open

FOWEPJF255 wants to merge 1 commit into
Aider-AI:mainfrom
FOWEPJF255:fix/fuzzy-match-models-list-attrs-5537

Conversation

@FOWEPJF255

Copy link
Copy Markdown

Summary

  • Guard fuzzy_match_models against non-dict values in litellm.model_cost / local metadata so sanity checks do not raise AttributeError on attrs.get.
  • Add a regression test covering a list-valued metadata entry.

Fixes #5537

Test plan

  • python -m pytest tests/basic/test_models.py::TestModels::test_fuzzy_match_models_skips_non_dict_attrs -q

Guard fuzzy_match_models against list-valued metadata so sanity checks
do not raise AttributeError on attrs.get.
@CLAassistant

CLAassistant commented Sep 12, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@FOWEPJF255

Copy link
Copy Markdown
Author

Friendly bump: still mergeable for #5537 when you have a chance to look.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uncaught AttributeError in models.py line 1221

3 participants