litellm icon indicating copy to clipboard operation
litellm copied to clipboard

[Bug]: RuntimeError: "Stream consumed" on /v1/audio/transcriptions endpoint

Open lloukmane opened this issue 1 year ago • 1 comments

What happened?

Hello,

I’m encountering an issue when invoking the Whisper model on the /v1/audio/transcriptions endpoint using LiteLLM version 1.48.5. The problem occurs when the model is part of an access group that the API key has valid permissions for. However, when the API key has access to all-team-models, no error occurs.

Could you assist in identifying the cause and a possible resolution?

Relevant log output

LiteLLM Proxy:ERROR[0m: user_api_key_auth.py:1136 - litellm.proxy.proxy_server.user_api_key_auth(): Exception occured - Stream consumed
Requester IP Address:XXXXXX
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/litellm/proxy/auth/user_api_key_auth.py", line 742, in user_api_key_auth
    data = await request.json()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/requests.py", line 251, in json
    body = await self.body()
           ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/requests.py", line 244, in body
    async for chunk in self.stream():
  File "/usr/local/lib/python3.11/site-packages/starlette/requests.py", line 227, in stream
    raise RuntimeError("Stream consumed")
RuntimeError: Stream consumed

Twitter / LinkedIn details

No response

lloukmane avatar Oct 11 '24 09:10 lloukmane

Same error for me

MattCarneiro avatar Oct 18 '24 18:10 MattCarneiro

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Jan 28 '25 02:01 github-actions[bot]