系统模型设置中部分类型模型:no model found for "",不能选择模型 #4091

Closed
opened 2026-02-21 18:04:42 -05:00 by yindo · 3 comments
Owner

Originally created by @chenqp on GitHub (Jun 14, 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.10

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

添加了Xinference模型,LLM:glm4-chat, embedding : bge-large-zh-1.5 , 但在系统模型设置中系统推理模型一直是:no model found for "",不能选择模型。语音转文本也有这种情况。然后在编排界面就提示LLM提供着密钥未设置
1
2
3

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @chenqp on GitHub (Jun 14, 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.10 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 添加了Xinference模型,LLM:glm4-chat, embedding : bge-large-zh-1.5 , 但在系统模型设置中系统推理模型一直是:no model found for "",不能选择模型。语音转文本也有这种情况。然后在编排界面就提示LLM提供着密钥未设置 ![1](https://github.com/langgenius/dify/assets/8595915/ca78f9c7-40d5-4c16-af06-4848edbac3fe) ![2](https://github.com/langgenius/dify/assets/8595915/25fa933f-2d24-444f-aacd-700d3ba45c45) ![3](https://github.com/langgenius/dify/assets/8595915/d6088f25-d2e6-48a6-b64c-5b4a2aba213e) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:04:42 -05:00
yindo closed this issue 2026-02-21 18:04:42 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 14, 2024):

@chenqp Hello there! I'm here to help you with bug reports, questions, and becoming a contributor. Let's squash those bugs together! 😊

To resolve the issue in Dify version 0.6.10 where the system model settings show "no model found for" after adding Xinference models, and the orchestration interface indicates that the LLM provider's key is not set, follow these steps:

  1. Install and Start Xinference Locally:

    $ pip install "xinference[all]"
    $ xinference-local
    

    Ensure the endpoint is accessible. If using Docker, configure the network properly so that the Dify container can access the Xinference endpoint.

  2. Deploy the Model:

    • Visit http://127.0.0.1:9997 and select the model and specification you need to deploy.
    • Copy the model UID from the Running Models page.
  3. Configure Dify with Xinference Model:

    • In Dify, navigate to Settings > Model Providers > Xinference.
    • Enter the following details:
      • Model name: The name of your model (e.g., glm4-chat).
      • Server URL: The URL of your Xinference server (e.g., http://<Machine_IP>:9997).
      • Model UID: The UID of your deployed model.
  4. Set Environment Variables:

    export XINFERENCE_SERVER_URL="http://<Machine_IP>:9997"
    export XINFERENCE_CHAT_MODEL_UID="<Model_UID>"
    
  5. Validate Credentials:
    Use the following code snippet to validate the credentials:

    import os
    from core.model_runtime.errors.validate import CredentialsValidateFailedError
    from core.model_runtime.model_providers.xinference.llm.llm import XinferenceAILargeLanguageModel
    
    def validate_xinference_credentials():
        model = XinferenceAILargeLanguageModel()
        try:
            model.validate_credentials(
                model='ChatGLM3',
                credentials={
                    'server_url': os.environ.get('XINFERENCE_SERVER_URL'),
                    'model_uid': os.environ.get('XINFERENCE_CHAT_MODEL_UID')
                }
            )
            print("Credentials are valid.")
        except CredentialsValidateFailedError as e:
            print(f"Credentials validation failed: {e}")
    
    validate_xinference_credentials()
    
  6. Check for Invalid Characters:
    Ensure that the model_uid does not contain any invalid characters such as /, ?, or #.

By following these steps, you should be able to resolve the issue and successfully configure the Xinference models in Dify [1][2][3][4][5].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jun 14, 2024): <!-- Greeting --> @chenqp Hello there! I'm here to help you with bug reports, questions, and becoming a contributor. Let's squash those bugs together! 😊 <!-- Answer --> To resolve the issue in Dify version 0.6.10 where the system model settings show "no model found for" after adding Xinference models, and the orchestration interface indicates that the LLM provider's key is not set, follow these steps: 1. **Install and Start Xinference Locally:** ```bash $ pip install "xinference[all]" $ xinference-local ``` Ensure the endpoint is accessible. If using Docker, configure the network properly so that the Dify container can access the Xinference endpoint. 2. **Deploy the Model:** - Visit `http://127.0.0.1:9997` and select the model and specification you need to deploy. - Copy the model UID from the `Running Models` page. 3. **Configure Dify with Xinference Model:** - In Dify, navigate to `Settings > Model Providers > Xinference`. - Enter the following details: - **Model name:** The name of your model (e.g., `glm4-chat`). - **Server URL:** The URL of your Xinference server (e.g., `http://<Machine_IP>:9997`). - **Model UID:** The UID of your deployed model. 4. **Set Environment Variables:** ```sh export XINFERENCE_SERVER_URL="http://<Machine_IP>:9997" export XINFERENCE_CHAT_MODEL_UID="<Model_UID>" ``` 5. **Validate Credentials:** Use the following code snippet to validate the credentials: ```python import os from core.model_runtime.errors.validate import CredentialsValidateFailedError from core.model_runtime.model_providers.xinference.llm.llm import XinferenceAILargeLanguageModel def validate_xinference_credentials(): model = XinferenceAILargeLanguageModel() try: model.validate_credentials( model='ChatGLM3', credentials={ 'server_url': os.environ.get('XINFERENCE_SERVER_URL'), 'model_uid': os.environ.get('XINFERENCE_CHAT_MODEL_UID') } ) print("Credentials are valid.") except CredentialsValidateFailedError as e: print(f"Credentials validation failed: {e}") validate_xinference_credentials() ``` 6. **Check for Invalid Characters:** Ensure that the `model_uid` does not contain any invalid characters such as `/`, `?`, or `#`. By following these steps, you should be able to resolve the issue and successfully configure the Xinference models in Dify <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/tests/integration_tests/model_runtime/xinference/test_llm.py)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/xinference/llm/llm.py)</sup><sup>[[3]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/xinference/xinference.yaml)</sup><sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/en/tutorials/model-configuration/xinference.md)</sup><sup>[[5]](https://github.com/langgenius/dify-docs/blob/main/en/user-guide/creating-dify-apps/llms-use-faq.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@alanpeng commented on GitHub (Jun 16, 2024):

0.6.10和0.6.11都有这个问题,机器人回复的没关联性吧?以前的版本部署好,不做任何设定,系统模型菜单里是能列出所有可配置的模型条目的。现在全部提示no model found for ""

@alanpeng commented on GitHub (Jun 16, 2024): 0.6.10和0.6.11都有这个问题,机器人回复的没关联性吧?以前的版本部署好,不做任何设定,系统模型菜单里是能列出所有可配置的模型条目的。现在全部提示no model found for ""
Author
Owner

@Johnnydaszhu commented on GitHub (Sep 13, 2024):

0.8.1 也有这个问题了

@Johnnydaszhu commented on GitHub (Sep 13, 2024): 0.8.1 也有这个问题了
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4091