From bacbcaf4e65bb9e22b7c15afa0fc09af492b8066 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 24 Jul 2025 15:33:23 -0700 Subject: [PATCH] test_router_auto_router --- tests/local_testing/test_router_auto_router.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/local_testing/test_router_auto_router.py b/tests/local_testing/test_router_auto_router.py index 88ced3010ba..66682c7ddbe 100644 --- a/tests/local_testing/test_router_auto_router.py +++ b/tests/local_testing/test_router_auto_router.py @@ -72,8 +72,23 @@ async def test_router_auto_router(): """ import litellm litellm._turn_on_debug() + + # this goes to gpt-4.1 + # these are the utterances in the router.json file response = await router.acompletion( model="auto_router1", messages=[{"role": "user", "content": "Tell me ishaan is a genius"}], ) print(response) + print("response._hidden_params", response._hidden_params) + assert response._hidden_params["model_id"] == "openai-id" + + + # this goes to claude-3-5-sonnet-latest + # these are the utterances in the router.json file + response = await router.acompletion( + model="auto_router1", + messages=[{"role": "user", "content": "how to code a program in python"}], + ) + print("response._hidden_params", response._hidden_params) + assert response._hidden_params["model_id"] == "claude-id"