Summary
The first action that reaches LiteLLM prints to the terminal underneath the TUI's
own rendering, and the screen stays unreadable until something forces a full redraw.
_strip_tty_stream_handlers removes the handlers that write to the terminal at
startup, but LiteLLM is imported lazily, after that -- and its import installs its
own stderr handler. The root logger's level is 0, so DEBUG records pass as well.
Steps to reproduce
- Run
raven tui.
- Type
/model.
- Open a provider whose model list is not cached yet, so LiteLLM is imported.
Expected behavior
Nothing LiteLLM logs reaches the terminal while the TUI owns it. The log file under
~/.raven already exists and is the destination.
Actual behavior
Log lines land mid-render and the layout is broken until the next full redraw.
Logs or screenshots
LiteLLM:WARNING: common_utils.py:979 - litellm: could not pre-load bedrock-runtime
response stream shape - Bedrock event-stream decoding will be unavailable.
Error: No module named 'botocore'
Environment
OS: macOS 26.5 (arm64)
Shell: zsh
Python: 3.12.12
Node: v24.14.0
Raven: 3087174 (origin/main)
Install: source checkout, uv sync
litellm: 1.85.0
Summary
The first action that reaches LiteLLM prints to the terminal underneath the TUI's
own rendering, and the screen stays unreadable until something forces a full redraw.
_strip_tty_stream_handlersremoves the handlers that write to the terminal atstartup, but LiteLLM is imported lazily, after that -- and its import installs its
own stderr handler. The root logger's level is 0, so DEBUG records pass as well.
Steps to reproduce
raven tui./model.Expected behavior
Nothing LiteLLM logs reaches the terminal while the TUI owns it. The log file under
~/.ravenalready exists and is the destination.Actual behavior
Log lines land mid-render and the layout is broken until the next full redraw.
Logs or screenshots
Environment