Skip to content

refactor: replace rich console with standard logging and improve api …#85

Merged
wang-boyu merged 2 commits intomesa:mainfrom
uday-codes69:improve-logging-and-error-handling
Feb 28, 2026
Merged

refactor: replace rich console with standard logging and improve api …#85
wang-boyu merged 2 commits intomesa:mainfrom
uday-codes69:improve-logging-and-error-handling

Conversation

@uday-codes69
Copy link
Copy Markdown
Contributor

Overview
This PR improves the logging and error handling within the

ModuleLLM
class to better align with Python library best practices.

Key Changes
Replaced rich.console with logging: Switched from using rich.console.Console for warnings to the standard Python logging module. This allows integrators to manage log levels and outputs through standard configuration.
Enhanced API Key Error Messages: Updated the ValueError raised when a provider's API key is missing. The error now explicitly states the required environment variable name (e.g., OPENAI_API_KEY) and suggests a fix (e.g., "set it in your .env file").
Cleaned up Warning Strings: Standardized the formatting of warning logs to use parameter injection instead of f-strings, consistent with logging standards.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 24, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@wang-boyu wang-boyu added the maintenance Release notes label label Feb 26, 2026
@uday-codes69
Copy link
Copy Markdown
Contributor Author

@wang-boyu Sir can you check this?

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.33%. Comparing base (379c4d8) to head (9d5db03).
⚠️ Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #85      +/-   ##
==========================================
+ Coverage   87.61%   88.33%   +0.71%     
==========================================
  Files          19       19              
  Lines        1405     1423      +18     
==========================================
+ Hits         1231     1257      +26     
+ Misses        174      166       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wang-boyu
Copy link
Copy Markdown
Member

Thanks. LGTM. Merging now.

@wang-boyu wang-boyu merged commit 01b29d5 into mesa:main Feb 28, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Release notes label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants