LiteLLM Vertex AI bug hardcodes audio rates causing transcription errors
A bug in the LiteLLM SDK hardcodes Vertex AI audio sample rates to 24000Hz, causing audio corruption and transcription errors for applications using the 16000Hz standard. The issue has been identified and a fix is currently in development within the project's staging branch.
Key Takeaways
- The VertexAIRealtimeConfig class hardcodes pcm16 audio to 24000Hz, overriding client-specified rates.
- Testing confirmed the sample rate mismatch causes hallucinated words and dropped clauses in Gemini 3.5 transcripts.
- A fix is currently in development within the BerriAI litellm_internal_staging branch to allow correct rate declarations.
- The issue persists even if the parent GeminiRealtimeConfig class is patched, due to a specific subclass override in the Vertex AI path.
Why It Matters
The immediate implication of this LiteLLM Vertex AI bug is a forced degradation of ASR performance for developers using the proxy for real-time audio processing. By mislabeling 16kHz audio as 24kHz, the system introduces pitch and speed distortions that render high-stakes transcriptions unreliable. Within the broader ecosystem, this highlights the risks of using abstraction layers for low-latency AI services where precise metadata handling is critical for model performance. As streaming providers increasingly integrate live AI transcription, ensuring parity between SDKs and native cloud provider specifications is essential for maintaining service quality. Watch for the merge of commit ad10cdf into the main LiteLLM branch to resolve these synchronization errors.
Additional Context
LiteLLM has grown into one of the most widely adopted open-source proxy layers for routing requests across multiple LLM providers, but its abstraction approach has introduced friction points when provider-specific parameters require precise handling. BerriAI, the company behind LiteLLM, raised $15 million in Series A funding in early 2025 to expand its enterprise proxy platform, positioning the tool as a unified interface for teams managing dozens of model endpoints simultaneously. The audio sample rate bug underscores a recurring challenge for such abstraction layers: when a proxy normalizes parameters across heterogeneous backends, provider-specific defaults can silently override caller intent, particularly for real-time audio and speech-to-text workloads where timing metadata is critical.
Google's Vertex AI platform has been expanding its multimodal capabilities aggressively, with Gemini models serving as the flagship offering for audio, video, and text processing. Google announced Gemini 2.5 Flash with native audio understanding capabilities in March 2025, targeting developers building real-time transcription and voice-agent applications. The 16000Hz sample rate that Google recommends for speech input aligns with the telephony and streaming industry standard for ASR pipelines, making the hardcoded 24000Hz value in LiteLLM particularly damaging for production deployments that depend on accurate transcription. For streaming platforms integrating live captioning or content moderation via Gemini, even brief periods of corrupted audio metadata can cascade into compliance failures and degraded user experience.
The broader category of AI proxy and gateway tools has seen increased scrutiny around parameter fidelity as enterprises move from prototyping to production. Portkey AI, a competing LLM gateway, published benchmarks in 2025 showing that proxy-induced latency and parameter mismatches can degrade model output quality by up to 12% on structured tasks, a finding that resonates with the LiteLLM audio bug's impact on transcription accuracy. Meanwhile, Google Cloud expanded Vertex AI's speech-to-text API with automatic sample rate detection in mid-2025, reducing the burden on client-side SDKs to specify rates correctly. That server-side improvement may eventually mitigate the class of bug LiteLLM introduced, but until abstraction layers adopt similar defensive defaults, developers routing audio through proxies remain exposed to silent parameter overrides.
Read full article at github.com
Enjoy our coverage?
Add StreamingMeme as a preferred source on Google to see more of our streaming news at the top of your Search results.
Add as preferred source