mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-14 04:09:09 +00:00
fix(vertex-ai): use provider speech media type in proxy
This commit is contained in:
parent
c37b63ebbd
commit
a72002a84e
1 changed files with 1 additions and 15 deletions
|
|
@ -12150,24 +12150,10 @@ async def audio_speech(
|
|||
upstream_content_type: Final = (
|
||||
response.response.headers.get("content-type") if isinstance(response, HttpxBinaryResponseContent) else None
|
||||
)
|
||||
resolved_media_type: Final = resolve_speech_media_type(
|
||||
media_type: Final = extra_media_type or resolve_speech_media_type(
|
||||
upstream_content_type=upstream_content_type,
|
||||
response_format=requested_format_str,
|
||||
)
|
||||
request_model: Final = data.get("model", "")
|
||||
media_type: Final = (
|
||||
extra_media_type
|
||||
if extra_media_type is not None
|
||||
else (
|
||||
"audio/wav"
|
||||
if (
|
||||
requested_format_str is None
|
||||
and isinstance(request_model, str)
|
||||
and litellm.utils.is_gemini_tts_model(request_model)
|
||||
)
|
||||
else resolved_media_type
|
||||
)
|
||||
)
|
||||
|
||||
return StreamingResponse(
|
||||
_audio_speech_chunk_generator(response),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue