Could not intergrate LiteLLM into Dify via OpenAI-API-Compatible #3391

Closed
opened 2026-02-21 17:57:17 -05:00 by yindo · 0 comments
Owner

Originally created by @tuanlv14 on GitHub (May 16, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.8

Cloud or Self Hosted

Cloud

Steps to reproduce

I use OpenAI-API-Compatible to add my local Lite LLM under Base_URL = http://localhost:4000 ; LiteLLM API key, Model_name (masked, proxy) by LiteLLM. The function of LiteLLM worked well with curl and python test method. But I cannot add local LiteLLM into Dify.

✔️ Expected Behavior

I expect LiteLLM can work well with Dify.

Actual Behavior

The error: An error occurred during credentials validation: HTTPConnectionPool(host='localhost', port=4000): Max retries exceeded with url: /chat/completions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f966023a4d0>: Failed to establish a new connection: [Errno 111] Connection refused'))

Originally created by @tuanlv14 on GitHub (May 16, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.8 ### Cloud or Self Hosted Cloud ### Steps to reproduce I use OpenAI-API-Compatible to add my local Lite LLM under Base_URL = http://localhost:4000 ; LiteLLM API key, Model_name (masked, proxy) by LiteLLM. The function of LiteLLM worked well with curl and python test method. But I cannot add local LiteLLM into Dify. ### ✔️ Expected Behavior I expect LiteLLM can work well with Dify. ### ❌ Actual Behavior The error: An error occurred during credentials validation: HTTPConnectionPool(host='localhost', port=4000): Max retries exceeded with url: /chat/completions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f966023a4d0>: Failed to establish a new connection: [Errno 111] Connection refused'))
yindo added the 🐞 bug label 2026-02-21 17:57:17 -05:00
yindo closed this issue 2026-02-21 17:57:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#3391