litellm - ✅(Solved) Fix [Feature]: Voxtral transcription [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#23272Fetched 2026-04-08 00:37:50
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×3cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #22801: feat(mistral): add Voxtral audio transcription support

Description (problem / solution / changelog)

Relevant issues

Addresses discussion #12952 Closes #23272

Pre-Submission checklist

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Type

🆕 New Feature

Changes

Adds Mistral Voxtral audio transcription support via litellm.transcription().

  • New: litellm/llms/mistral/audio_transcription/transformation.pyMistralAudioTranscriptionConfig implementing multipart form-data requests to POST https://api.mistral.ai/v1/audio/transcriptions
  • Modified: litellm/utils.py — Register Mistral in ProviderConfigManager.get_provider_audio_transcription_config()
  • Modified: litellm/litellm_core_utils/get_supported_openai_params.py — Add transcription request_type for mistral provider
  • New: 9 unit tests covering URL construction, auth headers, request/response transformation, param mapping, and provider-specific param passthrough (e.g. diarize)
  • Docs: Added Mistral to supported providers in audio_transcription.md and added Audio Transcription section to providers/mistral.md

Usage

response = litellm.transcription(
    model="mistral/voxtral-mini-latest",
    file=open("audio.wav", "rb"),
)
print(response.text)

Supports OpenAI-compatible params (language, temperature, response_format, timestamp_granularities) plus Mistral-specific params like diarize.

Changed files

  • docs/my-website/docs/audio_transcription.md (modified, +2/-1)
  • docs/my-website/docs/providers/mistral.md (modified, +73/-0)
  • litellm/litellm_core_utils/get_supported_openai_params.py (modified, +8/-0)
  • litellm/llms/mistral/audio_transcription/transformation.py (added, +152/-0)
  • litellm/utils.py (modified, +6/-0)
  • tests/test_litellm/llms/mistral/audio_transcription/test_mistral_audio_transcription_transformation.py (added, +170/-0)
RAW_BUFFERClick to expand / collapse

Check for existing issues

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

The Feature

Litellm has a transcription endpoint with several models and providers supported now. But it is missing Mistral Voxtral. Since Mistral has a quite straightforward API and transparent pricing, it should be possible to add this as a supported provider. I think it should be similar to the OpenAI Whisper API. Support for the realtime model would be nice but not essential as I can imagine this is more complex.

Motivation, pitch

I am using the Mistral API to transcribe audio since it has several advantages over Whisper and related models:

  • Lower cost per minute
  • Speaker separation
  • More accurate
  • Higher max length

And since it is open source it can be expected to be more widely employed. Support for this model including cost tracking would greatly help me with observability of my automations.

What part of LiteLLM is this about?

Proxy

LiteLLM is hiring a founding backend engineer, are you interested in joining us and shipping to all our users?

No

Twitter / LinkedIn details

No response

extent analysis

Fix Plan

To add support for Mistral Voxtral as a transcription provider in Litellm, follow these steps:

  • Add a new provider class for Mistral Voxtral, similar to the existing OpenAI Whisper API class.
  • Implement the necessary API calls to interact with the Mistral API, including authentication and transcription requests.
  • Integrate the new provider with the existing transcription endpoint, allowing users to select Mistral Voxtral as a supported model.

Example code snippet (Python):

# mistral_voxtral_provider.py
import requests

class MistralVoxtralProvider:
    def __init__(self, api_key, api_url):
        self.api_key = api_key
        self.api_url = api_url

    def transcribe(self, audio_file):
        # Implement transcription request to Mistral API
        headers = {"Authorization": f"Bearer {self.api_key}"}
        response = requests.post(self.api_url, headers=headers, files={"audio": audio_file})
        return response.json()

# proxy.py
from mistral_voxtral_provider import MistralVoxtralProvider

class TranscriptionProxy:
    def __init__(self):
        self.providers = {
            "mistral_voxtral": MistralVoxtralProvider("api_key", "api_url")
        }

    def transcribe(self, audio_file, provider):
        return self.providers[provider].transcribe(audio_file)

Verification

To verify that the fix worked, test the transcription endpoint with the new Mistral Voxtral provider:

  • Send a transcription request to the endpoint with the mistral_voxtral provider selected.
  • Verify that the response contains the expected transcription result.
  • Test with different audio files and providers to ensure compatibility.

Extra Tips

  • Ensure proper error handling and logging for the new provider.
  • Consider adding support for real-time transcription and cost tracking for the Mistral Voxtral provider.
  • Review the existing codebase for any similar providers or functionality that can be reused or refactored.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING