mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
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:
parent
1ec87b4798
commit
a2a13f622c
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue