X Tutup
Skip to content

Commit 85791c9

Browse files
cursoragentclaude
andcommitted
Remove unused BinaryContent and ImageUrl imports from pydantic_ai utils
The BinaryContent and ImageUrl imports in spans/utils.py were never referenced. The serialization functions accept Any and don't perform isinstance checks - those checks are done by callers in ai_client.py and invoke_agent.py which have their own imports. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent eb4393d commit 85791c9

File tree

1 file changed

+0
-6
lines changed
  • sentry_sdk/integrations/pydantic_ai/spans

1 file changed

+0
-6
lines changed

sentry_sdk/integrations/pydantic_ai/spans/utils.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
from typing import Union, Dict, Any, List, Optional
1414
from pydantic_ai.usage import RequestUsage, RunUsage # type: ignore
1515

16-
try:
17-
from pydantic_ai.messages import BinaryContent, ImageUrl # type: ignore
18-
except ImportError:
19-
BinaryContent = None
20-
ImageUrl = None
21-
2216

2317
def _serialize_image_url_item(item: "Any") -> "Dict[str, Any]":
2418
"""Serialize an ImageUrl content item for span data.

0 commit comments

Comments
 (0)
X Tutup