Skip to content

Commit 47f8dc4

Browse files
committed
Drop the negative unknown-call-type test
1 parent b57b7f9 commit 47f8dc4

1 file changed

Lines changed: 1 addition & 43 deletions

File tree

tests/integrations/litellm/test_litellm.py

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async def __call__(self, *args, **kwargs):
3434
from litellm.litellm_core_utils.logging_worker import GLOBAL_LOGGING_WORKER
3535
from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, HTTPHandler
3636
from openai import AsyncOpenAI, OpenAI
37-
from openai.types import Completion, CompletionUsage, Image, ImagesResponse
37+
from openai.types import Completion, CompletionUsage
3838
from openai.types.completion_choice import CompletionChoice
3939

4040
from sentry_sdk import start_transaction
@@ -3521,45 +3521,3 @@ def test_responses_operation_name(
35213521
assert span["op"] == OP.GEN_AI_RESPONSES
35223522
assert span["description"] == "responses gpt-4"
35233523
assert span["data"][SPANDATA.GEN_AI_OPERATION_NAME] == "responses"
3524-
3525-
3526-
def test_unknown_call_type_is_not_instrumented(
3527-
sentry_init,
3528-
capture_events,
3529-
get_model_response,
3530-
reset_litellm_executor,
3531-
):
3532-
"""Call types with no accurate operation name emit no span at all."""
3533-
sentry_init(
3534-
integrations=[LiteLLMIntegration()],
3535-
disabled_integrations=[StdlibIntegration],
3536-
traces_sample_rate=1.0,
3537-
stream_gen_ai_spans=False,
3538-
)
3539-
events = capture_events()
3540-
3541-
client = OpenAI(api_key="test-key")
3542-
3543-
model_response = get_model_response(
3544-
ImagesResponse(
3545-
created=1234567890,
3546-
data=[Image(url="https://example.com/image.png")],
3547-
),
3548-
serialize_pydantic=True,
3549-
)
3550-
3551-
with mock.patch.object(
3552-
client.images._client._client,
3553-
"send",
3554-
return_value=model_response,
3555-
), start_transaction(name="litellm test"):
3556-
litellm.image_generation(
3557-
model="dall-e-3",
3558-
prompt="A cat",
3559-
client=client,
3560-
)
3561-
3562-
litellm_utils.executor.shutdown(wait=True)
3563-
3564-
(event,) = events
3565-
assert [s for s in event["spans"] if s["origin"] == "auto.ai.litellm"] == []

0 commit comments

Comments
 (0)