Commit Graph

2 Commits

Author SHA1 Message Date
Devin AI
5fcfba82dc Fix lint errors: Remove unused imports
- Remove unused contextlib, sys, threading, io, TextIO imports from llm.py
- Remove unused importlib import from test_sys_stream_hijacking.py
- Address Ruff lint failures from CI

Co-Authored-By: João <joao@crewai.com>
2025-06-11 23:38:37 +00:00
Devin AI
519af74cf7 Fix issue #3000: Replace global sys.stdout/stderr hijacking with contextual suppression
- Remove FilteredStream class that globally hijacked sys.stdout and sys.stderr
- Replace with logging-based suppression using litellm logger level control
- Add contextual suppression around litellm.completion calls only
- Add comprehensive tests to verify fix and prevent regression
- Ensure streaming responses work correctly without interference
- Maintain litellm output filtering during LLM calls only

Co-Authored-By: João <joao@crewai.com>
2025-06-11 23:34:20 +00:00