mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
refactor(streaming): drop explanatory comment from MidStreamFallbackError header copy
This commit is contained in:
parent
abb8aa1672
commit
7a373a3ae0
2 changed files with 1 additions and 8 deletions
|
|
@ -1184,9 +1184,6 @@ class MidStreamFallbackError(ServiceUnavailableError):
|
|||
self.message = _saved_message
|
||||
self.args = (_saved_message,)
|
||||
|
||||
# Keep the provider headers (retry-after, x-request-id, ...) that exception_type()
|
||||
# attached to the wrapped exception, so retry backoff, logging and the proxy error
|
||||
# response still see them once the failure is wrapped for fallback
|
||||
original_headers: Final = getattr(original_exception, "litellm_response_headers", None)
|
||||
if original_headers is not None:
|
||||
self.litellm_response_headers = original_headers
|
||||
|
|
|
|||
|
|
@ -853,11 +853,7 @@ def test_sync_streaming_rate_limit_triggers_midstream_fallback(logging_obj: Logg
|
|||
async def test_streaming_rate_limit_midstream_fallback_keeps_provider_headers(
|
||||
logging_obj: Logging,
|
||||
):
|
||||
"""MidStreamFallbackError keeps the provider headers the non-streaming RateLimitError carries.
|
||||
|
||||
retry-after and x-request-id are what retry backoff, logging and the proxy error
|
||||
response read, so wrapping a 429 for fallback must not drop them.
|
||||
"""
|
||||
"""MidStreamFallbackError keeps the provider headers the non-streaming RateLimitError carries."""
|
||||
from litellm.exceptions import MidStreamFallbackError
|
||||
from litellm.llms.vertex_ai.common_utils import VertexAIError
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue