mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
* fix(audio): don't override explicit response_format with verbose_json
* fix(audio): handle plain-text response body for response_format=text
* fix(audio): only swallow non-JSON transcription body when not declared JSON
Guard the plain-text fallback in transform_audio_transcription_response with
the response Content-Type: a body that fails json() but is labelled
application/json is a genuine upstream error and is re-raised, while
text/plain bodies (response_format=text) are still returned as-is. Prevents
a malformed JSON 2xx from silently becoming a transcription of garbled bytes.
* fix: normalize content-type header case in whisper transcription fallback
* test(audio): lock in case-insensitive content-type guard for transcription fallback
Adds a regression test that a mixed-case 'Application/JSON' content-type still
re-raises a malformed JSON body, covering the case-insensitivity fix in
|
||
|---|---|---|
| .. | ||
| test_audio_transcription_guardrail_handler.py | ||
| test_transcription_duration_hidden.py | ||
| test_whisper_transformation.py | ||