You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think this is a Groq error because I've tried calling Groq directly (using the openAI client) and it works and with the exact same input it's getting the error thrown.
Weirdly though, the streaming response prior to the error looks OK (i.e. the content returned before the error is the same as calling Groq directly).
Thanks in advance!
23:24:34 - LiteLLM Proxy:ERROR: proxy_server.py:2995 - litellm.proxy.proxy_server.async_data_generator(): Exception occured - litellm.APIConnectionError: APIConnectionError: GroqException - list index out of range
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/litellm/litellm_core_utils/streaming_handler.py", line 1545, in __anext__
async for chunk in self.completion_stream:
...<50 lines>...
return processed_chunk
File "/usr/lib/python3.13/site-packages/litellm/llms/databricks/streaming_utils.py", line 143, in __anext__
return self.chunk_parser(chunk=json_chunk)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/litellm/llms/databricks/streaming_utils.py", line 28, in chunk_parser
if processed_chunk.choices[0].delta.content is not None: # type: ignore
~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/litellm/proxy/proxy_server.py", line 2974, in async_data_generator
async for chunk in response:
...<14 lines>...
yield f"data: {str(e)}\n\n"
File "/usr/lib/python3.13/site-packages/litellm/litellm_core_utils/streaming_handler.py", line 1700, in __anext__
raise exception_type(
~~~~~~~~~~~~~~^
model=self.model,
^^^^^^^^^^^^^^^^^
...<3 lines>...
extra_kwargs={},
^^^^^^^^^^^^^^^^
)
^
File "/usr/lib/python3.13/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 2195, in exception_type
raise e # it's already mapped
^^^^^^^
File "/usr/lib/python3.13/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 461, in exception_type
raise APIConnectionError(
...<7 lines>...
)
litellm.exceptions.APIConnectionError: litellm.APIConnectionError: APIConnectionError: GroqException - list index out of range
What happened?
Not sure if this is a Groq problem or litellm problem. Here is a code snippet to reproduce the issue:
Turning off include_usage will make it work. From the log, it looks like it is using databricks for parsing.
Relevant log output
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
1.61.7
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: