@@ -1107,7 +1107,7 @@ def test_content_to_message_param_user_message_with_file_uri():
11071107 assert message ["content" ][0 ]["text" ] == "Summarize this file."
11081108 assert message ["content" ][1 ]["type" ] == "file"
11091109 assert message ["content" ][1 ]["file" ]["file_id" ] == "gs://bucket/document.pdf"
1110- assert message ["content" ][1 ]["file" ][ "format" ] == "application/pdf"
1110+ assert "format" not in message ["content" ][1 ]["file" ]
11111111
11121112
11131113def test_content_to_message_param_user_message_file_uri_only ():
@@ -1126,7 +1126,7 @@ def test_content_to_message_param_user_message_file_uri_only():
11261126 assert isinstance (message ["content" ], list )
11271127 assert message ["content" ][0 ]["type" ] == "file"
11281128 assert message ["content" ][0 ]["file" ]["file_id" ] == "gs://bucket/only.pdf"
1129- assert message ["content" ][0 ]["file" ][ "format" ] == "application/pdf"
1129+ assert "format" not in message ["content" ][0 ]["file" ]
11301130
11311131
11321132def test_content_to_message_param_multi_part_function_response ():
@@ -1278,7 +1278,7 @@ def test_get_content_image():
12781278 content [0 ]["image_url" ]["url" ]
12791279 == "data:image/png;base64,dGVzdF9pbWFnZV9kYXRh"
12801280 )
1281- assert content [0 ]["image_url" ][ "format" ] == "image/png"
1281+ assert "format" not in content [0 ]["image_url" ]
12821282
12831283
12841284def test_get_content_video ():
@@ -1291,7 +1291,7 @@ def test_get_content_video():
12911291 content [0 ]["video_url" ]["url" ]
12921292 == "data:video/mp4;base64,dGVzdF92aWRlb19kYXRh"
12931293 )
1294- assert content [0 ]["video_url" ][ "format" ] == "video/mp4"
1294+ assert "format" not in content [0 ]["video_url" ]
12951295
12961296
12971297def test_get_content_pdf ():
@@ -1304,7 +1304,7 @@ def test_get_content_pdf():
13041304 content [0 ]["file" ]["file_data" ]
13051305 == "data:application/pdf;base64,dGVzdF9wZGZfZGF0YQ=="
13061306 )
1307- assert content [0 ]["file" ][ "format" ] == "application/pdf"
1307+ assert "format" not in content [0 ]["file" ]
13081308
13091309
13101310def test_get_content_file_uri ():
@@ -1317,7 +1317,7 @@ def test_get_content_file_uri():
13171317 content = _get_content (parts )
13181318 assert content [0 ]["type" ] == "file"
13191319 assert content [0 ]["file" ]["file_id" ] == "gs://bucket/document.pdf"
1320- assert content [0 ]["file" ][ "format" ] == "application/pdf"
1320+ assert "format" not in content [0 ]["file" ]
13211321
13221322
13231323def test_get_content_audio ():
@@ -1330,7 +1330,7 @@ def test_get_content_audio():
13301330 content [0 ]["audio_url" ]["url" ]
13311331 == "data:audio/mpeg;base64,dGVzdF9hdWRpb19kYXRh"
13321332 )
1333- assert content [0 ]["audio_url" ][ "format" ] == "audio/mpeg"
1333+ assert "format" not in content [0 ]["audio_url" ]
13341334
13351335
13361336def test_to_litellm_role ():
0 commit comments