Skip to content

Commit 7d825af

Browse files
committed
fix: wrong modality and type for file references
1 parent 37b1761 commit 7d825af

File tree

1 file changed

+3
-2
lines changed
  • sentry_sdk/integrations/google_genai

1 file changed

+3
-2
lines changed

sentry_sdk/integrations/google_genai/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,10 @@ def extract_contents_messages(contents: "ContentListUnion") -> "List[Dict[str, A
262262
mime_type = getattr(contents, "mime_type", None)
263263
if file_uri and mime_type:
264264
blob_part = {
265-
"type": "blob",
265+
"type": "uri",
266+
"modality": get_modality_from_mime_type(mime_type),
266267
"mime_type": mime_type,
267-
"file_uri": file_uri,
268+
"uri": file_uri,
268269
}
269270
return [{"role": "user", "content": [blob_part]}]
270271

0 commit comments

Comments
 (0)