fix(tts): resolve Gemini TTS models from catalog

Resolve Gemini TTS models from shared TTS catalog and provider registry
with a safe fallback, fixing requests resolving to models/undefined when
ttsConfig.models is empty. Add gemini-3.1-flash-tts-preview to catalogs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
nguyenha935
2026-06-26 10:31:22 +07:00
committed by decolua
parent 644bff4cdd
commit ce844899ed
4 changed files with 109 additions and 3 deletions

View File

@@ -96,10 +96,12 @@ export const TTS_MODELS_CONFIG = {
},
gemini: {
models: [
{ id: "gemini-3.1-flash-tts-preview", name: "Gemini 3.1 Flash TTS", type: "tts" },
{ id: "gemini-2.5-flash-preview-tts", name: "Gemini 2.5 Flash TTS", type: "tts" },
{ id: "gemini-2.5-pro-preview-tts", name: "Gemini 2.5 Pro TTS", type: "tts" },
],
voices: {
"gemini-3.1-flash-tts-preview": GEMINI_VOICES,
"gemini-2.5-flash-preview-tts": GEMINI_VOICES,
"gemini-2.5-pro-preview-tts": GEMINI_VOICES,
},