litellm/tests/unit/test_router
devin-ai-integration[bot] 4adbc13d79
fix(router): hold Responses lifecycle events until output so a pre-output fallback announces one response (#43238)
* fix(router): hold Responses lifecycle events until output so a pre-output fallback announces one response

* fix(router): narrow the responses wrapper close guards to Exception and test the hold helpers directly

* test(router): type the responses fallback test helpers

* fix(router): replay the held lifecycle events when the fallback stream fails before its first event

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-09-25 18:16:05 -07:00
..
__init__.py test: add __init__.py to every tests/unit directory phase 16 touches 2026-09-20 11:52:38 +00:00
test_enforce_model_rate_limits.py test: migrate phase 16 legacy tests to tests/unit 2026-09-20 10:59:02 +00:00
test_io_token_rate_limits.py test: migrate phase 16 legacy tests to tests/unit 2026-09-20 10:59:02 +00:00
test_router.py fix(router): hold Responses lifecycle events until output so a pre-output fallback announces one response (#43238) 2026-09-25 18:16:05 -07:00