litellm/tests/test_litellm/llms/gemini
Cesar Garcia 999ffabc39
fix(gemini): use JSON instead of form-data for image edit requests (#18012)
* fix(gemini): use JSON instead of form-data for image edit requests

Gemini's image edit API expects JSON body, not multipart/form-data.
The handler was sending form-encoded data which caused 400 errors:
"Invalid JSON payload received. Unexpected token."

Changes:
- Add use_multipart_form_data() method to BaseImageEditConfig (default True)
- Modify image_edit_handler to use json= when use_multipart_form_data() is False
- Override use_multipart_form_data() in GeminiImageEditConfig to return False

* test(gemini): add test for use_multipart_form_data
2025-12-16 07:41:02 +05:30
..
image_edit fix(gemini): use JSON instead of form-data for image edit requests (#18012) 2025-12-16 07:41:02 +05:30
realtime
videos Add Vertex and Gemini Videos API with Cost Tracking + UI support (#16323) 2025-11-08 16:03:51 -08:00
test_gemini_client_setup.py
test_gemini_common_utils.py
test_gemini_tts.py fix: add speechConfig to GenerationConfig for Gemini TTS (#17851) 2025-12-12 03:56:44 -08:00