Fix STT auto-detection: don't route to LiteLLM unless LITELLM_STT_MODEL is set
Having LITELLM_API_BASE for AI text was auto-routing audio transcription through LiteLLM even when the proxy has no Whisper model configured, causing silent hangs. Now LiteLLM STT only activates when LITELLM_STT_MODEL is explicitly set. Falls back correctly to AWS Transcribe when configured.
This commit is contained in:
parent
ce7d0e749d
commit
96dc40fd0b
1 changed files with 3 additions and 2 deletions
|
|
@ -22,8 +22,9 @@ function getTranscribeProvider() {
|
|||
if (env === 'local') return 'local';
|
||||
if (env === 'aws') return 'aws';
|
||||
if (env === 'openai') return 'openai';
|
||||
// Auto-detect
|
||||
if (process.env.LITELLM_API_BASE && litellmClient) return 'litellm';
|
||||
// Auto-detect: only use LiteLLM for STT if LITELLM_STT_MODEL is explicitly set
|
||||
// Having LITELLM_API_BASE for AI text does NOT automatically route audio through LiteLLM
|
||||
if (process.env.LITELLM_STT_MODEL && process.env.LITELLM_API_BASE && litellmClient) return 'litellm';
|
||||
if (isAWSTranscribeConfigured()) return 'aws';
|
||||
return 'openai';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue