From a9ea5713ab9f8af17e2abec43714ed37b4c710e4 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Wed, 9 Sep 2026 14:01:38 -0700 Subject: [PATCH] test(router): type the breadcrumb test helpers --- tests/test_litellm/test_router.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_litellm/test_router.py b/tests/test_litellm/test_router.py index 91b84db9444..0f24afa6ddd 100644 --- a/tests/test_litellm/test_router.py +++ b/tests/test_litellm/test_router.py @@ -8687,7 +8687,7 @@ async def test_retry_breadcrumbs_never_carry_a_forwarded_credential(container_ke assert _BREADCRUMB_CREDENTIAL_CANARY not in dumped -def _always_failing_router(num_retries): +def _always_failing_router(num_retries: int) -> litellm.Router: return litellm.Router( model_list=[ { @@ -8703,7 +8703,7 @@ def _always_failing_router(num_retries): ) -async def _fail_one_proxy_shaped_request(router, request_marker): +async def _fail_one_proxy_shaped_request(router: litellm.Router, request_marker: str): """The proxy hands the router a metadata dict and a proxy_server_request whose body is a shallow copy of the request, so body["metadata"] is the very same dict the router later stamps previous_models onto.""" @@ -8723,7 +8723,7 @@ async def _fail_one_proxy_shaped_request(router, request_marker): return metadata["previous_models"] -def _nested_breadcrumb_lists(node): +def _nested_breadcrumb_lists(node: object) -> list[object]: if isinstance(node, dict): return [v for k, v in node.items() if k == "previous_models"] + [ found for v in node.values() for found in _nested_breadcrumb_lists(v)