From 450505e926d32e0c31f3e7c9ffce376e76ecf898 Mon Sep 17 00:00:00 2001 From: Monesh Ram <31161039+WhoisMonesh@users.noreply.github.com> Date: Sat, 21 Feb 2026 16:28:09 +0530 Subject: [PATCH] fix(vertex_ai): add 'audio' to get_supported_openai_params in VertexGeminiConfig Fixes #21702 The `audio` parameter was missing from `VertexGeminiConfig.get_supported_openai_params()`, causing it to be silently filtered out before reaching `map_openai_params()`. This prevented the `audio` -> `speechConfig` mapping from working for `vertex_ai/` Gemini TTS models. The `map_openai_params()` already had the correct mapping for `audio` -> `speechConfig`, but since `audio` was not listed in `get_supported_openai_params()`, it was dropped before reaching the mapping logic. This fix adds `"audio"` to the supported params list, enabling `/v1/audio/speech` to work correctly with `vertex_ai/gemini-2.5-flash-preview-tts` and other Vertex AI TTS models without requiring the `allowed_openai_params` workaround. --- .../llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py b/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py index d248d2862e8..5aeb5be4c78 100644 --- a/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py +++ b/litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py @@ -271,6 +271,7 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig): "modalities", "parallel_tool_calls", "web_search_options", + "audio", ] # Add penalty parameters only for non-preview models