mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
test(router): type the breadcrumb test helpers
This commit is contained in:
parent
76b5fec1c5
commit
a9ea5713ab
1 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue