test(streaming): tolerate Vertex 429 wrapped in MidStreamFallbackError (#28669)
Streaming 429s are wrapped in MidStreamFallbackError so the Router can fall back; the existing 'except litellm.RateLimitError: pass' in test_vertex_ai_stream no longer matches, causing the generic pytest.fail branch to fire when upstream Vertex returns 429. Add a sibling except for MidStreamFallbackError that only swallows it when e.original_exception is a RateLimitError, so unrelated streaming failures still fail the test.
This commit is contained in:
parent
1b141bc588
commit
574ee7526d
@ -993,6 +993,11 @@ def test_vertex_ai_stream(provider):
|
||||
|
||||
except litellm.RateLimitError as e:
|
||||
pass
|
||||
except litellm.exceptions.MidStreamFallbackError as e:
|
||||
# Streaming 429s are wrapped in MidStreamFallbackError so the
|
||||
# Router can fall back; treat as a transient rate-limit pass.
|
||||
if not isinstance(e.original_exception, litellm.RateLimitError):
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user