Skip to content

fix: report model import errors at startup#5087

Open
Kcstring wants to merge 1 commit intoAider-AI:mainfrom
Kcstring:fix-importerror-model-init-crash
Open

fix: report model import errors at startup#5087
Kcstring wants to merge 1 commit intoAider-AI:mainfrom
Kcstring:fix-importerror-model-init-crash

Conversation

@Kcstring
Copy link
Copy Markdown

Summary

  • catch ImportError while constructing the main model in main()
  • show the existing install guidance instead of crashing during startup when litellm/openai dependencies are incompatible
  • add a regression test for the startup path

Testing

  • python3 -m pytest tests/basic/test_main.py -k "model_import_error_is_reported or default_yes"
  • python3 -m ruff check aider/main.py tests/basic/test_main.py

Fixes #5055

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 _legacy_response.py line 27

1 participant