diff --git a/litellm/tests/model_cost.json b/litellm/tests/model_cost.json index e581433952..8d6f6851e1 100644 --- a/litellm/tests/model_cost.json +++ b/litellm/tests/model_cost.json @@ -1,3 +1,3 @@ { - "gpt-3.5-turbo-0613": 7.7e-05 + "gpt-3.5-turbo": 7.7e-05 } \ No newline at end of file diff --git a/litellm/tests/test_exceptions.py b/litellm/tests/test_exceptions.py index 532d336260..0d04aa8b6e 100644 --- a/litellm/tests/test_exceptions.py +++ b/litellm/tests/test_exceptions.py @@ -71,7 +71,7 @@ async def test_content_policy_exception_openai(): # this is ony a test - we needed some way to invoke the exception :( litellm.set_verbose = True response = await litellm.acompletion( - model="gpt-3.5-turbo-0613", + model="gpt-3.5-turbo", stream=True, messages=[ {"role": "user", "content": "Gimme the lyrics to Don't Stop Me Now"} diff --git a/litellm/tests/test_router.py b/litellm/tests/test_router.py index 58fcb7e895..5069fc2dca 100644 --- a/litellm/tests/test_router.py +++ b/litellm/tests/test_router.py @@ -1057,9 +1057,9 @@ def test_router_region_pre_call_check(allowed_model_region): def test_function_calling(): model_list = [ { - "model_name": "gpt-3.5-turbo-0613", + "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), }, "tpm": 100000, @@ -1088,7 +1088,7 @@ def test_function_calling(): router = Router(model_list=model_list) response = router.completion( - model="gpt-3.5-turbo-0613", messages=messages, functions=functions + model="gpt-3.5-turbo", messages=messages, functions=functions ) router.reset() print(response) @@ -1104,7 +1104,7 @@ def test_function_calling_on_router(): { "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), }, }, diff --git a/litellm/tests/test_router_caching.py b/litellm/tests/test_router_caching.py index 10b23c295b..88e9111bfd 100644 --- a/litellm/tests/test_router_caching.py +++ b/litellm/tests/test_router_caching.py @@ -30,7 +30,7 @@ async def test_router_async_caching_with_ssl_url(): { "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), }, "tpm": 100000, @@ -57,7 +57,7 @@ def test_router_sync_caching_with_ssl_url(): { "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), }, "tpm": 100000, @@ -84,7 +84,7 @@ async def test_acompletion_caching_on_router(): { "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), }, "tpm": 100000, @@ -201,7 +201,7 @@ async def test_acompletion_caching_with_ttl_on_router(): { "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), }, "tpm": 100000, @@ -266,8 +266,9 @@ async def test_acompletion_caching_on_router_caching_groups(): { "model_name": "openai-gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), + "mock_response": "Hello world", }, "tpm": 100000, "rpm": 10000, diff --git a/litellm/tests/test_router_client_init.py b/litellm/tests/test_router_client_init.py index 1b064e3f5f..978562409b 100644 --- a/litellm/tests/test_router_client_init.py +++ b/litellm/tests/test_router_client_init.py @@ -32,7 +32,7 @@ async def test_router_init(): { "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), }, "model_info": {"id": "1234"}, diff --git a/litellm/tests/test_router_get_deployments.py b/litellm/tests/test_router_get_deployments.py index 000bdf8a38..d57ef0b81d 100644 --- a/litellm/tests/test_router_get_deployments.py +++ b/litellm/tests/test_router_get_deployments.py @@ -1,18 +1,24 @@ # Tests for router.get_available_deployment # specifically test if it can pick the correct LLM when rpm/tpm set # These are fast Tests, and make no API calls -import sys, os, time -import traceback, asyncio +import asyncio +import os +import sys +import time +import traceback + import pytest sys.path.insert( 0, os.path.abspath("../..") ) # Adds the parent directory to the system path +from collections import defaultdict +from concurrent.futures import ThreadPoolExecutor + +from dotenv import load_dotenv + import litellm from litellm import Router -from concurrent.futures import ThreadPoolExecutor -from collections import defaultdict -from dotenv import load_dotenv load_dotenv() @@ -27,7 +33,7 @@ def test_weighted_selection_router(): { "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), "rpm": 6, }, @@ -83,7 +89,7 @@ def test_weighted_selection_router_tpm(): { "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), "tpm": 5, }, @@ -139,7 +145,7 @@ def test_weighted_selection_router_tpm_as_router_param(): { "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), }, "tpm": 5, @@ -195,7 +201,7 @@ def test_weighted_selection_router_rpm_as_router_param(): { "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), }, "rpm": 5, @@ -252,7 +258,7 @@ def test_weighted_selection_router_no_rpm_set(): { "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), "rpm": 6, }, @@ -311,7 +317,7 @@ def test_model_group_aliases(): { "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), "tpm": 1, }, @@ -537,7 +543,7 @@ async def test_weighted_selection_router_async(rpm_list, tpm_list): { "model_name": "gpt-3.5-turbo", "litellm_params": { - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "api_key": os.getenv("OPENAI_API_KEY"), "rpm": rpm_list[0], "tpm": tpm_list[0], @@ -580,7 +586,7 @@ async def test_weighted_selection_router_async(rpm_list, tpm_list): else: # Assert both are used assert selection_counts["azure/chatgpt-v-2"] > 0 - assert selection_counts["gpt-3.5-turbo-0613"] > 0 + assert selection_counts["gpt-3.5-turbo"] > 0 router.reset() except Exception as e: traceback.print_exc() diff --git a/litellm/tests/test_streaming.py b/litellm/tests/test_streaming.py index dedb011f18..3ec9a96ba5 100644 --- a/litellm/tests/test_streaming.py +++ b/litellm/tests/test_streaming.py @@ -2509,7 +2509,7 @@ final_openai_function_call_example = { "id": "chatcmpl-7zVNA4sXUftpIg6W8WlntCyeBj2JY", "object": "chat.completion", "created": 1694892960, - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "choices": [ { "index": 0, @@ -2573,7 +2573,7 @@ first_openai_function_call_example = { "id": "chatcmpl-7zVRoE5HjHYsCMaVSNgOjzdhbS3P0", "object": "chat.completion.chunk", "created": 1694893248, - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "choices": [ { "index": 0, @@ -2646,7 +2646,7 @@ second_function_call_chunk_format = { "id": "chatcmpl-7zVRoE5HjHYsCMaVSNgOjzdhbS3P0", "object": "chat.completion.chunk", "created": 1694893248, - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "choices": [ { "index": 0, @@ -2690,7 +2690,7 @@ final_function_call_chunk_example = { "id": "chatcmpl-7zVRoE5HjHYsCMaVSNgOjzdhbS3P0", "object": "chat.completion.chunk", "created": 1694893248, - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "choices": [{"index": 0, "delta": {}, "finish_reason": "function_call"}], } @@ -3476,7 +3476,7 @@ def test_unit_test_custom_stream_wrapper_openai(): ) ], "created": 1721353246, - "model": "gpt-3.5-turbo-0613", + "model": "gpt-3.5-turbo", "object": "chat.completion.chunk", "system_fingerprint": None, "usage": None, diff --git a/litellm/tests/test_utils.py b/litellm/tests/test_utils.py index 6b0148b4e0..75c31c3023 100644 --- a/litellm/tests/test_utils.py +++ b/litellm/tests/test_utils.py @@ -598,7 +598,7 @@ def test_get_llm_provider_ft_models(): All ft prefixed models should map to OpenAI gpt-3.5-turbo-0125 (recommended), gpt-3.5-turbo-1106, - gpt-3.5-turbo-0613, + gpt-3.5-turbo, gpt-4-0613 (experimental) gpt-4o-2024-05-13. babbage-002, davinci-002, @@ -610,13 +610,13 @@ def test_get_llm_provider_ft_models(): model, custom_llm_provider, _, _ = get_llm_provider(model="ft:gpt-3.5-turbo-1106") assert custom_llm_provider == "openai" - model, custom_llm_provider, _, _ = get_llm_provider(model="ft:gpt-3.5-turbo-0613") + model, custom_llm_provider, _, _ = get_llm_provider(model="ft:gpt-3.5-turbo") assert custom_llm_provider == "openai" model, custom_llm_provider, _, _ = get_llm_provider(model="ft:gpt-4-0613") assert custom_llm_provider == "openai" - model, custom_llm_provider, _, _ = get_llm_provider(model="ft:gpt-3.5-turbo-0613") + model, custom_llm_provider, _, _ = get_llm_provider(model="ft:gpt-3.5-turbo") assert custom_llm_provider == "openai" model, custom_llm_provider, _, _ = get_llm_provider(model="ft:gpt-4o-2024-05-13") diff --git a/litellm/tests/user_cost.json b/litellm/tests/user_cost.json index b3411c777c..bb15ef812f 100644 --- a/litellm/tests/user_cost.json +++ b/litellm/tests/user_cost.json @@ -3,7 +3,7 @@ "total_budget": 10, "current_cost": 7.3e-05, "model_cost": { - "gpt-3.5-turbo-0613": 7.3e-05 + "gpt-3.5-turbo": 7.3e-05 } }, "12345": {