BerriAI / litellm

Python SDK, Proxy Server (LLM Gateway) to call 100+ LLM APIs in OpenAI format - [Bedrock, Azure, OpenAI, VertexAI, Cohere, Anthropic, Sagemaker, HuggingFace, Replicate, Groq]
https://docs.litellm.ai/docs/
Other
12.64k stars 1.47k forks source link

[Bug]: health check error with audio_transcription model #5999

Open lloukmane opened 2 days ago

lloukmane commented 2 days ago

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

ishaan-jaff commented 7 hours ago

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/

lloukmane commented 5 hours ago

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
krrishdholakia commented 3 hours ago

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