diff --git a/litellm/proxy/example_config_yaml/otel_test_config.yaml b/litellm/proxy/example_config_yaml/otel_test_config.yaml index 7d8f6d4fe..54d9286c9 100644 --- a/litellm/proxy/example_config_yaml/otel_test_config.yaml +++ b/litellm/proxy/example_config_yaml/otel_test_config.yaml @@ -4,6 +4,17 @@ model_list: model: openai/fake api_key: fake-key api_base: https://exampleopenaiendpoint-production.up.railway.app/ + tags: ["teamA"] + model_info: + id: "teama" + - model_name: fake-openai-endpoint + litellm_params: + model: openai/fake + api_key: fake-key + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + tags: ["teamB"] + model_info: + id: "teamb" - model_name: rerank-english-v3.0 litellm_params: model: cohere/rerank-english-v3.0 diff --git a/litellm/proxy/proxy_config.yaml b/litellm/proxy/proxy_config.yaml index 5f9f99d57..1afac20cd 100644 --- a/litellm/proxy/proxy_config.yaml +++ b/litellm/proxy/proxy_config.yaml @@ -1,15 +1,21 @@ model_list: - - model_name: gpt-4 + - model_name: fake-openai-endpoint litellm_params: model: openai/fake api_key: fake-key api_base: https://exampleopenaiendpoint-production.up.railway.app/ - tags: ["teamA"] # 👈 Key Change - - model_name: gpt-4 + tags: ["teamA"] + model_info: + id: "teama" + - model_name: fake-openai-endpoint litellm_params: - model: openai/gpt-4o - api_key: os.environ/OPENAI_API_KEY - tags: ["teamB"] # 👈 Key Change + model: openai/fake + api_key: fake-key + api_base: https://exampleopenaiendpoint-production.up.railway.app/ + tags: ["teamB"] + model_info: + id: "teamb" + router_settings: enable_tag_filtering: True # 👈 Key Change diff --git a/tests/otel_tests/test_team_tag_routing.py b/tests/otel_tests/test_team_tag_routing.py index 56bf361a8..390e7dce6 100644 --- a/tests/otel_tests/test_team_tag_routing.py +++ b/tests/otel_tests/test_team_tag_routing.py @@ -119,3 +119,14 @@ async def test_team_tag_routing(): print(response_b) print(headers) assert headers["x-litellm-model-id"] == "teamb", "Model ID should be teamB" + + +@pytest.mark.asyncio() +async def test_chat_completion_with_no_tags(): + async with aiohttp.ClientSession() as session: + key = LITELLM_MASTER_KEY + response, headers = await chat_completion(session, key) + headers = dict(headers) + print(response) + print(headers) + assert response is not None