The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test: update testing - having removed the router client init logic
Krrish Dholakiaae021671a82c
diff --git a/tests/local_testing/test_router_client_init.py b/tests/local_testing/test_router_client_init.pyindex 0249358e91e..dc0f4f237d0 100644--- a/tests/local_testing/test_router_client_init.py+++ b/tests/local_testing/test_router_client_init.py@@ -182,25 +182,25 @@ def test_router_init_azure_service_principal_with_secret_with_environment_variab# initialize the routerrouter = Router(model_list=model_list)- # first check if environment variables were used at all- mocked_environ.assert_called()- # then check if the client was initialized with the correct environment variables- mocked_credential.assert_called_with(- **{- "client_id": environment_variables_expected_to_use["AZURE_CLIENT_ID"],- "client_secret": environment_variables_expected_to_use[- "AZURE_CLIENT_SECRET"- ],- "tenant_id": environment_variables_expected_to_use["AZURE_TENANT_ID"],- }- )- # check if the token provider was called at all- mocked_get_bearer_token_provider.assert_called()- # then check if the token provider was initialized with the mocked credential- for call_args in mocked_get_bearer_token_provider.call_args_list:- assert call_args.args[0] == mocked_credential.return_value- # however, at this point token should not be fetched yet- mocked_func_generating_token.assert_not_called()+ # # first check if environment variables were used at all+ # mocked_environ.assert_called()+ # # then check if the client was initialized with the correct environment variables+ # mocked_credential.assert_called_with(+ # **{+ # "client_id": environment_variables_expected_to_use["AZURE_CLIENT_ID"],+ # "client_secret": environment_variables_expected_to_use[+ # "AZURE_CLIENT_SECRET"+ # ],+ # "tenant_id": environment_variables_expected_to_use["AZURE_TENANT_ID"],+ # }+ # )+ # # check if the token provider was called at all+ # mocked_get_bearer_token_provider.assert_called()+ # # then check if the token provider was initialized with the mocked credential+ # for call_args in mocked_get_bearer_token_provider.call_args_list:+ # assert call_args.args[0] == mocked_credential.return_value+ # # however, at this point token should not be fetched yet+ # mocked_func_generating_token.assert_not_called()# now let's try to make a completion calldeployment = model_list[0]diff --git a/tests/router_unit_tests/test_router_helper_utils.py b/tests/router_unit_tests/test_router_helper_utils.pyindex f12371baebc..782f0d8fbb1 100644--- a/tests/router_unit_tests/test_router_helper_utils.py+++ b/tests/router_unit_tests/test_router_helper_utils.py@@ -338,18 +338,6 @@ def test_update_kwargs_with_default_litellm_params(model_list):assert kwargs["metadata"]["key2"] == "value2"-def test_get_async_openai_model_client(model_list):- """Test if the '_get_async_openai_model_client' function is working correctly"""- router = Router(model_list=model_list)- deployment = router.get_deployment_by_model_group_name(- model_group_name="gpt-3.5-turbo"- )- model_client = router._get_async_openai_model_client(- deployment=deployment, kwargs={}- )- assert model_client is not None--def test_get_timeout(model_list):"""Test if the '_get_timeout' function is working correctly"""router = Router(model_list=model_list)