{"record":{"id":"75a75f5ae696fd31","repo":"BerriAI/litellm","slug":"unmapped-provider-passed-in-unable-to-get-the-res","errorCode":null,"errorMessage":"Unmapped provider passed in. Unable to get the response.","messagePattern":"Unmapped provider passed in\\. Unable to get the response\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/main.py","lineNumber":7859,"sourceCode":"            api_base=api_base,\n            api_key=api_key,\n            custom_llm_provider=custom_llm_provider,\n            headers={},\n            provider_config=provider_config,\n            shared_session=shared_session,\n        )\n\n    # Store duration in _hidden_params for cost calculation without\n    # exposing it in the response body (see sync path comment above).\n    if response is not None and not isinstance(response, Coroutine):\n        existing_duration: Final = getattr(response, \"duration\", None)\n        if existing_duration is None:\n            calculated_duration: Final = calculate_request_duration(file)\n            if calculated_duration is not None:\n                response._hidden_params[\"audio_transcription_duration\"] = calculated_duration\n\n    if response is None:\n        raise ValueError(\"Unmapped provider passed in. Unable to get the response.\")\n    return response\n\n\n@client\nasync def aspeech(*args, **kwargs) -> HttpxBinaryResponseContent:\n    \"\"\"\n    Calls openai tts endpoints.\n    \"\"\"\n    loop: Final = asyncio.get_event_loop()\n    model: Final = args[0] if len(args) > 0 else kwargs[\"model\"]\n    ### PASS ARGS TO Image Generation ###\n    kwargs[\"aspeech\"] = True\n    custom_llm_provider = kwargs.get(\"custom_llm_provider\", None)\n    try:\n        # Use a partial function to pass your keyword arguments\n        func: Final = partial(speech, *args, **kwargs)\n\n        # Add the context to the function","sourceCodeStart":7841,"sourceCodeEnd":7877,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/main.py#L7841-L7877","documentation":"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.","triggerScenarios":"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.","commonSituations":"Pointing transcription at a chat model; custom CustomLLM handlers that never implemented transcription(); an older litellm lacking newer transcription providers.","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"],"exampleFix":"# before\nresp = litellm.transcription(model=\"my-chat-model\", file=f)\n\n# after\nresp = litellm.transcription(model=\"openai/whisper-1\", file=f)","handlingStrategy":"validation","validationCode":"import litellm\n\nTRANSCRIPTION_PROVIDERS = {\"openai\", \"azure\", \"groq\", \"vertex_ai\"}  # adjust to your version\nprovider = model.partition(\"/\")[0]\nif provider not in TRANSCRIPTION_PROVIDERS:\n    raise ValueError(f\"{provider!r} does not support audio transcription\")","typeGuard":null,"tryCatchPattern":"try:\n    resp = litellm.transcription(model=model, file=f)\nexcept ValueError as e:\n    if \"Unmapped provider\" in str(e):\n        raise RuntimeError(f\"provider for {model!r} cannot transcribe\") from e\n    raise","preventionTips":["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"],"tags":["litellm","transcription","provider"],"backgroundTag":"unknown-provider","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}