Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

get_provider_text_to_speech_config

Ishaan Jaffer5ce2be732e9b
diff --git a/litellm/utils.py b/litellm/utils.py
index ed6bbee73fc..c2e245acb5f 100644
--- a/litellm/utils.py
+++ b/litellm/utils.py
@@ -7632,11 +7632,14 @@ class ProviderConfigManager:
)
if litellm.LlmProviders.AZURE == provider:
- from litellm.llms.azure.text_to_speech.transformation import (
- AzureAVATextToSpeechConfig,
- )
+ # Only return Azure AVA config for Azure Speech Service models (speech/)
+ # Azure OpenAI TTS models (azure/azure-tts) should not use this config
+ if model.startswith("speech/"):
+ from litellm.llms.azure.text_to_speech.transformation import (
+ AzureAVATextToSpeechConfig,
+ )
- return AzureAVATextToSpeechConfig()
+ return AzureAVATextToSpeechConfig()
return None
@staticmethod