test: move helicone gemini test to tests/litellm/
Move test to correct directory per PR template requirements.
This commit is contained in:
parent
542abc0429
commit
cc39c71ac6
35
tests/litellm/integrations/helicone/test_helicone_gemini.py
Normal file
35
tests/litellm/integrations/helicone/test_helicone_gemini.py
Normal file
@ -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"
|
||||
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user