test(gemini): fix test_file_data_field_order to use GCS URL instead of Files API URI

The field-order test was using a Files API URI, which no longer sets
mime_type after the fix. Switch to a GCS URL where mime_type is required
so the ordering assertion remains valid.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jean Carlos NUnez 2026-04-02 11:35:37 -05:00
parent 1ec87b4798
commit a2a13f622c

View file

@ -1105,8 +1105,10 @@ def test_file_data_field_order():
from litellm.llms.vertex_ai.gemini.transformation import _process_gemini_media
# Test with HTTPS URL and explicit format (audio file)
file_url = "https://generativelanguage.googleapis.com/v1beta/files/test123"
# Test with GCS URL and explicit format (audio file).
# Files API URIs (generativelanguage.googleapis.com/.../files/…) are intentionally
# excluded here — the Files API already knows the mime type so we never set it.
file_url = "gs://my-bucket/audio/sample.mp3"
format = "audio/mpeg"
result = _process_gemini_media(image_url=file_url, format=format)