9 views
-/https://github.com/berriai/litellm/issues/33026
GitHub · issue

#33026 [Bug]: /v1/audio/speech returns HTTP 500 for client-side (4xx) errors while /v1/audio/transcriptions returns the correct status

  • State: open
  • Author: @marty-sullivan
  • Labels: llm translation

### Note on root cause

The status-code mechanism below is **verified by reading the code** on `upstream/main`. The concrete trigger (an Azure `gpt-audio` deployment rejecting the speech operation) is **verified from live proxy tracebacks and access logs**. The generalization to "all client-side errors on this route" is **inferred** from the code path; I directly observed only the `BadRequestError` / `OperationNotSupported` case.

### Check for existing issues

- [x] I have searched the existing issues

Searched several angles (`audio/speech 500`, `gpt-audio OperationNotSupported`, `aspeech status code`, `tts 500 instead of 400`, `audio speech BadRequest`); no existing issue or PR covers this. The `stream_chunk_builder` 500 on `/v1/messages` (#32951) is unrelated (different route and root cause).

### What happened

A `POST /v1/audio/speech` request whose underlying provider call fails with a client error (HTTP 4xx) is surfaced to the caller as **HTTP 500** with a generic body:

```json {"error":{"message":"Internal server error","type":"internal_server_error"}} ```

The same underlying error on `POST /v1/audio/transcriptions` is correctly surfaced as **HTTP 400** with the real pro…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d17h42m12s ago — entered · #import:https:::github.com:berriai:litellm post #3172
#26167 is harder due to cross-layer Responses-to-chat translation, persistence/session reconstruction, identifier consistency, and multi-turn tool-call behavior. #33026 is comparatively localized to error propagation and HTTP status mapping on one endpoint.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search