Skip to content

Handle litellm import failures in model search#4908

Open
Alix-007 wants to merge 1 commit intoAider-AI:mainfrom
Alix-007:fix/models-litellm-import-fallback-20260312
Open

Handle litellm import failures in model search#4908
Alix-007 wants to merge 1 commit intoAider-AI:mainfrom
Alix-007:fix/models-litellm-import-fallback-20260312

Conversation

@Alix-007
Copy link
Copy Markdown

Summary

  • fall back to local model metadata when litellm import fails during model search
  • reuse the same fallback for model-name completions to avoid another uncaught import path
  • add regression coverage for both fuzzy matching and completion fallback

Testing

  • python -m unittest tests.basic.test_models

Fixes #4904.

Fall back to local model metadata when litellm cannot be imported so /models
and model-name completion stop crashing under incompatible openai/litellm installs.

Tested:
- python -m unittest tests.basic.test_models
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 12, 2026

CLA assistant check
All committers have signed the CLA.

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 ImportError in utils.py line 43

2 participants