Fix STT: AWS Transcribe takes priority over LiteLLM in auto-detect

LiteLLM's atranscription has a routing bug with Vertex AI Chirp proxy.
AWS Transcribe is already configured and working. Auto-detect now prefers
AWS over LiteLLM. Use TRANSCRIBE_PROVIDER=litellm to force LiteLLM.
This commit is contained in:
Daniel Onyejesi 2026-03-29 22:38:06 -04:00
parent 63d8a881cb
commit 7a50bc061d

View file

@ -22,9 +22,10 @@ function getTranscribeProvider() {
if (env === 'local') return 'local';
if (env === 'aws') return 'aws';
if (env === 'openai') return 'openai';
// Auto-detect: use LiteLLM when configured (it handles audio transcriptions)
if (process.env.LITELLM_API_BASE && litellmClient) return 'litellm';
// Auto-detect priority: AWS > LiteLLM > OpenAI
// LiteLLM's Vertex AI audio proxy has routing bugs — only use it if explicitly set
if (isAWSTranscribeConfigured()) return 'aws';
if (process.env.LITELLM_API_BASE && litellmClient) return 'litellm';
return 'openai';
}