Skip to content

Error using openai/whisper-1 with OpenRouter provider in LiteLLM v1.83.10 #27083

Description

@alihossein

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

I am trying to use openai/whisper-1 for audio transcription via the OpenRouter provider. Although the model is configured in the LiteLLM proxy, the request fails with a provider mapping error and a 400 Bad Request.

Questions & Context:

I have reviewed the documentation (https://docs.litellm.ai/docs/audio_transcription) but I'm still facing issues.

  1. Is openai/whisper-1 currently unsupported when using the OpenRouter provider in LiteLLM?
  2. If it's not supported, what is the recommended configuration or workaround to perform audio transcription through LiteLLM with OpenRouter?

Expected Behavior:
Successful audio transcription using Whisper-compatible models through OpenRouter.

Actual Behavior:
I receive a ValueError: Unmapped provider and an OpenAI BadRequestError indicating an invalid model name.

Steps to Reproduce

  1. Add openai/whisper-1 to LiteLLM models via the Admin UI/config.
  2. Set the provider to openrouter.
  3. Make an audio transcription request (e.g., using the /v1/audio/transcriptions endpoint).
  4. See the error in the logs/response.
import os
from pathlib import Path

import litellm

os.environ["OPENROUTER_API_KEY"] = "sk-xxxxxxxxx-Mr-A"
audio_file = Path("test.mp3")

result = litellm.transcription(
    api_key="sk-xxxxxxxxx-Mr-A",
    api_base="https://llm.xx.ir/v1",
    model="openai/whisper-1",
    audio=open("test.mp3", "rb"),
    language="fa",
    response_format="json",
    file=audio_file
)
print(result.text)

Relevant log output

openai.BadRequestError: Error code: 400 - {'error': {'message': "{'error': '/audio/transcriptions: Invalid model name passed in model=whisper-1. Call `/v1/models` to view available models for your key.'}", 'type': 'None', 'param': 'None', 'code': '400'}}

ValueError: Unmapped provider passed in. Unable to get the response.

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v1.83.10

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions