From 50284771b7cbbef0197ee1ac19f14ccae29ba40c Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Mon, 4 Dec 2023 13:24:35 -0800 Subject: [PATCH] (test) test_reading proxy --- litellm/proxy/example_config_yaml/azure_config.yaml | 10 ++++------ litellm/tests/test_proxy_server.py | 10 +++++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/litellm/proxy/example_config_yaml/azure_config.yaml b/litellm/proxy/example_config_yaml/azure_config.yaml index 14e4a786f2..fd5865cd7c 100644 --- a/litellm/proxy/example_config_yaml/azure_config.yaml +++ b/litellm/proxy/example_config_yaml/azure_config.yaml @@ -4,14 +4,12 @@ model_list: model: azure/chatgpt-v-2 api_base: https://openai-gpt-4-test-v-1.openai.azure.com/ api_version: "2023-05-15" - azure_ad_token: eyJ0eXAiOiJ + api_key: os.environ/AZURE_API_KEY + tpm: 20_000 - model_name: gpt-4-team2 litellm_params: model: azure/gpt-4 - api_key: sk-123 + api_key: os.environ/AZURE_API_KEY api_base: https://openai-gpt-4-test-v-2.openai.azure.com/ - - model_name: gpt-4-team3 - litellm_params: - model: azure/gpt-4 - api_key: sk-123 + tpm: 100_000 diff --git a/litellm/tests/test_proxy_server.py b/litellm/tests/test_proxy_server.py index 858277dee2..189cf60839 100644 --- a/litellm/tests/test_proxy_server.py +++ b/litellm/tests/test_proxy_server.py @@ -172,9 +172,17 @@ from litellm.proxy.proxy_server import load_router_config def test_load_router_config(): try: print("testing reading config") + # this is a basic config.yaml with only a model result = load_router_config(router=None, config_file_path="../proxy/example_config_yaml/simple_config.yaml") print(result) assert len(result[1]) == 1 + + # this is a load balancing config yaml + result = load_router_config(router=None, config_file_path="../proxy/example_config_yaml/azure_config.yaml") + print(result) + assert len(result[1]) == 2 + + except Exception as e: pytest.fail("Proxy: Got exception reading config", e) -# test_load_router_config() +test_load_router_config()