[WIP] Fix pydantic parsing bug for usage attribute error#126
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: whoisjayd <88286024+whoisjayd@users.noreply.github.com>
|
Closing this PR because the base branch policy was not followed.
Please retarget this work to |
Reviewer's GuideExtends LiteLLM noise suppression to cover additional Pydantic serializer warnings and ensures LiteLLM’s verbose logger is safely silenced by installing a NullHandler when no handlers are present, with tests added for both behaviors. Flow diagram for updated suppress_litellm_noise behaviorflowchart TD
A[start suppress_litellm_noise] --> B[get verbose_logger]
B --> C[set verbose_logger.propagate to False]
C --> D[remove existing verbose_logger.handlers]
D --> E{verbose_logger.handlers is empty}
E -- yes --> F[verbose_logger.addHandler NullHandler]
E -- no --> G[skip adding NullHandler]
F --> H[apply warnings.filterwarnings with PYDANTIC_RESPONSE_USAGE_WARNING_PATTERN]
G --> H
H --> I[end suppress_litellm_noise]
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Closing this PR because the base branch policy was not followed.
Please retarget this work to |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #126 +/- ##
=======================================
Coverage 90.44% 90.44%
=======================================
Files 64 64
Lines 6333 6335 +2
Branches 930 931 +1
=======================================
+ Hits 5728 5730 +2
Misses 367 367
Partials 238 238 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.
Summary by Sourcery
Suppress LiteLLM’s noisy pydantic response warnings and stderr logging by tightening warning filters and ensuring the verbose logger uses a null handler when stripped of handlers.
Bug Fixes:
Enhancements:
Tests: