diff --git a/tests/litellm/integrations/helicone/test_helicone_gemini.py b/tests/litellm/integrations/helicone/test_helicone_gemini.py new file mode 100644 index 0000000000..37c50241a1 --- /dev/null +++ b/tests/litellm/integrations/helicone/test_helicone_gemini.py @@ -0,0 +1,35 @@ +""" +Test HeliconeLogger Gemini/Vertex AI support. +Fixes: https://github.com/BerriAI/litellm/issues/19093 +""" + +import pytest + + +def test_helicone_gemini_model_in_list(): + """ + Test that Gemini models are in the helicone_model_list. + """ + from litellm.integrations.helicone import HeliconeLogger + + logger = HeliconeLogger() + + # Test that "gemini" is in the model list + assert "gemini" in logger.helicone_model_list, "gemini should be in helicone_model_list" + + +def test_helicone_gemini_models_recognized(): + """ + Test that Gemini models are recognized and not replaced with gpt-3.5-turbo. + """ + from litellm.integrations.helicone import HeliconeLogger + + logger = HeliconeLogger() + + test_models = ["gemini-1.5-pro", "gemini-2.0-flash", "vertex_ai/gemini-1.5-flash"] + for model in test_models: + is_recognized = any( + accepted_model in model + for accepted_model in logger.helicone_model_list + ) + assert is_recognized, f"{model} should be recognized by helicone_model_list" diff --git a/tests/local_testing/test_helicone_integration.py b/tests/local_testing/test_helicone_integration.py index 6773a70ac6..ad8fe92d1e 100644 --- a/tests/local_testing/test_helicone_integration.py +++ b/tests/local_testing/test_helicone_integration.py @@ -162,27 +162,3 @@ def test_helicone_removes_otel_span_from_metadata(): assert result_metadata["other_metadata"] == "some_value" print("✅ Test passed: litellm_parent_otel_span was successfully removed from metadata") - - -def test_helicone_gemini_model_in_list(): - """ - Test that Gemini models are in the helicone_model_list and use the correct endpoint. - Fixes: https://github.com/BerriAI/litellm/issues/19093 - """ - from litellm.integrations.helicone import HeliconeLogger - - logger = HeliconeLogger() - - # Test that "gemini" is in the model list - assert "gemini" in logger.helicone_model_list, "gemini should be in helicone_model_list" - - # Test that gemini models are recognized (not replaced with gpt-3.5-turbo) - test_models = ["gemini-1.5-pro", "gemini-2.0-flash", "vertex_ai/gemini-1.5-flash"] - for model in test_models: - is_recognized = any( - accepted_model in model - for accepted_model in logger.helicone_model_list - ) - assert is_recognized, f"{model} should be recognized by helicone_model_list" - - print("✅ Test passed: Gemini models are properly supported in HeliconeLogger")