BerriAI/litellm · error · ValueError
Unmapped provider passed in. Unable to get the response.
Error message
Unmapped provider passed in. Unable to get the response.
What it means
The sync transcription() path ends by checking that some provider branch actually produced a response; when the model/provider routes nowhere and response stays None, it raises ValueError('Unmapped provider passed in.'). No network call may even have been attempted.
Source
Thrown at litellm/main.py:7859
api_base=api_base,
api_key=api_key,
custom_llm_provider=custom_llm_provider,
headers={},
provider_config=provider_config,
shared_session=shared_session,
)
# Store duration in _hidden_params for cost calculation without
# exposing it in the response body (see sync path comment above).
if response is not None and not isinstance(response, Coroutine):
existing_duration: Final = getattr(response, "duration", None)
if existing_duration is None:
calculated_duration: Final = calculate_request_duration(file)
if calculated_duration is not None:
response._hidden_params["audio_transcription_duration"] = calculated_duration
if response is None:
raise ValueError("Unmapped provider passed in. Unable to get the response.")
return response
@client
async def aspeech(*args, **kwargs) -> HttpxBinaryResponseContent:
"""
Calls openai tts endpoints.
"""
loop: Final = asyncio.get_event_loop()
model: Final = args[0] if len(args) > 0 else kwargs["model"]
### PASS ARGS TO Image Generation ###
kwargs["aspeech"] = True
custom_llm_provider = kwargs.get("custom_llm_provider", None)
try:
# Use a partial function to pass your keyword arguments
func: Final = partial(speech, *args, **kwargs)
# Add the context to the functionView on GitHub (pinned to 77b7c6c40c)
Solutions
- Use a transcription-capable model/provider, e.g. model='openai/whisper-1' or 'azure/whisper'
- For custom providers, implement transcription()/atranscription() on the CustomLLM handler
- Check the model prefix spelling against litellm.provider_list
- Upgrade litellm for newly supported transcription providers
Example fix
# before resp = litellm.transcription(model="my-chat-model", file=f) # after resp = litellm.transcription(model="openai/whisper-1", file=f)
Defensive patterns
Strategy: validation
Validate before calling
import litellm
TRANSCRIPTION_PROVIDERS = {"openai", "azure", "groq", "vertex_ai"} # adjust to your version
provider = model.partition("/")[0]
if provider not in TRANSCRIPTION_PROVIDERS:
raise ValueError(f"{provider!r} does not support audio transcription") Try / catch
try:
resp = litellm.transcription(model=model, file=f)
except ValueError as e:
if "Unmapped provider" in str(e):
raise RuntimeError(f"provider for {model!r} cannot transcribe") from e
raise Prevention
- Validate provider capability before routing audio files to it
- Keep a capability map of which providers your app uses for chat vs STT vs TTS
When it happens
Trigger: litellm.transcription(model=..., file=...) with a provider that does not implement audio transcription — a chat-only or embedding-only provider, a custom handler without transcription(), or a typo'd model prefix.
Common situations: Pointing transcription at a chat model; custom CustomLLM handlers that never implemented transcription(); an older litellm lacking newer transcription providers.
Related errors
- image generation config is not supported for {custom_llm_pro
- Provider '{provider}' not supported for Focus export
- Provider '{provider}' not supported for Focus export configu
- Unsupported provider config: {transcription_provider_config}
- api_base must be provided for Hosted VLLM rerank
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/75a75f5ae696fd31.
Report an issue: GitHub.