mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-17 04:34:25 +00:00
Moved speechConfig from RequestBody to GenerationConfig TypedDict so that TTS configuration survives the filtering in _transform_request_body(). This fixes the 400 INVALID_ARGUMENT error when using Gemini TTS models (gemini-2.5-flash-tts, gemini-2.5-flash-preview-tts, etc.) with both vertex_ai and gemini providers. Fixes: speechConfig was being created correctly in map_openai_params() but then filtered out because GenerationConfig.__annotations__.keys() didn't include it. Tested with both preview and non-preview TTS model names and both vertex_ai and gemini providers. |
||
|---|---|---|
| .. | ||
| image_edit | ||
| realtime | ||
| videos | ||
| test_gemini_client_setup.py | ||
| test_gemini_common_utils.py | ||
| test_gemini_tts.py | ||