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.
This commit is contained in:
Monesh Ram 2026-02-21 16:28:09 +05:30 committed by GitHub
parent 1df9bd96c7
commit 450505e926
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -271,6 +271,7 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
"modalities",
"parallel_tool_calls",
"web_search_options",
"audio",
]
# Add penalty parameters only for non-preview models