Change8
Error2 reports

Fix MidStreamFallbackError

in LiteLLM

Solution

MidStreamFallbackError in litellm usually arises when a streaming response fails mid-flight during a fallback scenario, obscuring the original error code. To fix this, ensure that the `MidStreamFallbackError` preserves the original exception's status code and message, allowing litellm to correctly handle errors like rate limits or other service issues further upstream - log this internal exception and its trace! Also ensure that any stream that throws an exception is immediately closed to prevent resource leaks.

Timeline

First reported:Feb 26, 2026
Last reported:Feb 27, 2026

Need More Help?

View the full changelog and migration guides for LiteLLM

View LiteLLM Changelog