[Bug]: health check error with audio_transcription model on cli tool
What happened?
When trying to perform a health check on the Azure OpenAI Whisper model (/health endpoint), I encountered an error stating that the audio file gettysburg.wav was not found.
Litellm version : 1.48.5 Mode is set to audio_transcription, as described in the documentation : https://docs.litellm.ai/docs/proxy/health#speech-to-text-models
It seems that the path is incorrect: /usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../tests/gettysburg.wav. The file is actually located at /usr/local/lib/python3.11/site-packages/litellm/tests/gettysburg.wav.
Relevant log output
[Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../tests/gettysburg.wav'\nHave you set 'mode' - https://docs.litellm.ai/docs/proxy/health#embedding-models\nstack trace: Traceback (most recent call last):\n File \"/usr/local/lib/python3.11/site-packages/litellm/main.py\", line 5239, in ahealth_check\n response = await azure_chat_completions.ahealth_check(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/azure.py\", line 1834, in ahealth_check\n audio_file = open(file_path, \"rb\")\n ^^^^^^^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../tests/gettysburg.wav'\n
Twitter / LinkedIn details
No response
Hi @lloukmane , thanks for using LiteLLM. Any chance we can hop on a call to learn how we can improve LiteLLM Proxy for you ?
We’re planning roadmap and I’d love to get your feedback
my cal for your convenience: https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat my linkedin if you prefer DMs: https://www.linkedin.com/in/reffajnaahsi/
Hello,
I'm still encountering the error with litellm version 1.48.10.
The path has been modified for the OpenAI provider but not for AzureOpenAI.
[Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../tests/gettysburg.wav'\nHave you set 'mode' - https://docs.litellm.ai/docs/proxy/health#embedding-models\nstack trace: Traceback (most recent call last):\n File \"/usr/local/lib/python3.11/site-packages/litellm/main.py\", line 5255, in ahealth_check\n response = await azure_chat_completions.ahealth_check(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/azure.py\", line 1814, in ahealth_check\n audio_file = open(file_path, \"rb\")\n ^^^^^^^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../tests/gettysburg.wav'\n
Hi @lloukmane fix pushed - https://github.com/BerriAI/litellm/commit/9f3583b2b1590ac0be7ceee0233af605ebf1961c
Can we do a ~10min call this/next week? Would love to learn how you're using litellm
Attaching our calendly for convenience: https://calendly.com/d/4mp-gd3-k5k/litellm-1-1-onboarding-chat
Hello, I'm still encountering the error with litellm version 1.48.12.
[Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../../../tests/gettysburg.wav'\nHave you set 'mode' - https://docs.litellm.ai/docs/proxy/health#embedding-models\nstack trace: Traceback (most recent call last):\n File \"/usr/local/lib/python3.11/site-packages/litellm/main.py\", line 5257, in ahealth_check\n response = await azure_chat_completions.ahealth_check(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/azure.py\", line 1819, in ahealth_check\n audio_file = open(file_path, \"rb\")\n ^^^^^^^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/litellm/llms/AzureOpenAI/../../../tests/gettysburg.wav'\n
@krrishdholakia I'm also still encountering this issue.
It looks like y'all are using the cli tool, not the docker image.
The .wav file is no longer in the cli tool (reducing size of python sdk).
What would the ideal solution here look like? @lloukmane @InventoCasa
It looks like y'all are using the cli tool, not the docker image.
The .wav file is no longer in the cli tool (reducing size of python sdk).
What would the ideal solution here look like? @lloukmane @InventoCasa
Hi, I'm using docker.
It looks like y'all are using the cli tool, not the docker image. The .wav file is no longer in the cli tool (reducing size of python sdk). What would the ideal solution here look like? @lloukmane @InventoCasa
Hi, I'm using docker.
Hi, I'm also using Docker.
Quick hack to fix the docker...
RUN mkdir /usr/local/lib/python3.11/site-packages/tests
COPY ./gettysburg.wav /usr/local/lib/python3.11/site-packages/tests
fixed here: https://github.com/BerriAI/litellm/pull/7455 - we use an internal .mp3 file for the health check