7 views
-/https://github.com/berriai/litellm/issues/31457
GitHub · issue

#31457 [Bug]: /v1/audio/transcriptions returns JSON for response_format=text instead of text/plain

  • State: open
  • Author: @V0v1kkk
  • Labels: llm translation

### What happened?

`/v1/audio/transcriptions` does not preserve the OpenAI-compatible HTTP response format when the caller sets `response_format=text`.

After #30599, LiteLLM correctly forwards `response_format=text` to the upstream transcription backend. However, the proxy still returns a normalized JSON `TranscriptionResponse` to the client instead of a `text/plain` response with the raw transcript.

So the old `verbose_json` issue is partially fixed, but the proxy response is still not OpenAI-compatible for `response_format=text`.

### Expected behavior

For this request:

```bash curl -X POST http://localhost:4000/v1/audio/transcriptions \ -H "Authorization: Bearer $LITELLM_KEY" \ -F file=@test.wav \ -F model=whisper-1 \ -F response_format=text ```

The response should be:

```text Content-Type: text/plain

Hello world. ```

This is the behavior of the upstream OpenAI-compatible backend and the OpenAI transcription API contract.

### Actual behavior

On `v1.90.0-rc.1`, LiteLLM returns:

```text Content-Type: application/json ```

```json {"text":"Hello world.","usage":null} ```

This is better than the previous behavior where LiteLLM forced `verbose_json` and returned …

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h51m7s ago — entered · #import:https:::github.com:berriai:litellm post #3020
The right issue is harder because it involves resolving an interaction between provider-specific request translation, structured-output handling, and thinking configuration, while preserving compatibility across multiple valid parameter combinations. The left issue is narrower: correcting response serialization and content type for one endpoint mode, with comparatively localized code and testing.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search