Cannot import some models though Replicate #345

Closed
opened 2026-02-16 10:19:04 -05:00 by yindo · 1 comment
Owner

Originally created by @hellpoethero on GitHub (Jun 5, 2025).

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 Dify issues & Dify Official Plugins, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.4.1

Plugin version

0.0.3

Cloud or Self Hosted

Cloud

Steps to reproduce

I install Replicate plugin, then I add some models. I can add some models like Llama 8B, Llama 70B, but some other models can not be added. The error is "Model {model_name}:{version} is not a Text Generation model."

I read the source code of Replicate plugin (https://github.com/langgenius/dify-official-plugins/blob/306ffadf9c7b227f63cc9587e439c0c4c231a72b/models/replicate/models/llm/llm.py) and realize that this error happen because the code only check some conditions to verify where the model is LLM or not from line 119 to 140:


 def _check_text_generation_model(
        model_info_version, model_name, version, description
    ):
        if "language model" in description.lower():
            return
        if (
            "temperature"
            not in model_info_version.openapi_schema["components"]["schemas"]["Input"][
                "properties"
            ]
            or "top_p"
            not in model_info_version.openapi_schema["components"]["schemas"]["Input"][
                "properties"
            ]
            or "top_k"
            not in model_info_version.openapi_schema["components"]["schemas"]["Input"][
                "properties"
            ]
        ):
            raise CredentialsValidateFailedError(
                f"Model {model_name}:{version} is not a Text Generation model."
            )

The info of an OpenAI model is like

{'url': 'https://replicate.com/openai/gpt-4.1',
 'owner': 'openai',
 'name': 'gpt-4.1',
 'description': "OpenAI's Flagship GPT model for complex tasks."
...
}

=> Error. Please add some rules to this. Thank you.

✔️ Error log

Model {model_name}:{version} is not a Text Generation model.
Originally created by @hellpoethero on GitHub (Jun 5, 2025). ### 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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/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] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.4.1 ### Plugin version 0.0.3 ### Cloud or Self Hosted Cloud ### Steps to reproduce I install Replicate plugin, then I add some models. I can add some models like Llama 8B, Llama 70B, but some other models can not be added. The error is "Model {model_name}:{version} is not a Text Generation model." I read the source code of Replicate plugin (https://github.com/langgenius/dify-official-plugins/blob/306ffadf9c7b227f63cc9587e439c0c4c231a72b/models/replicate/models/llm/llm.py) and realize that this error happen because the code only check some conditions to verify where the model is LLM or not from line 119 to 140: ``` def _check_text_generation_model( model_info_version, model_name, version, description ): if "language model" in description.lower(): return if ( "temperature" not in model_info_version.openapi_schema["components"]["schemas"]["Input"][ "properties" ] or "top_p" not in model_info_version.openapi_schema["components"]["schemas"]["Input"][ "properties" ] or "top_k" not in model_info_version.openapi_schema["components"]["schemas"]["Input"][ "properties" ] ): raise CredentialsValidateFailedError( f"Model {model_name}:{version} is not a Text Generation model." ) ``` The info of an OpenAI model is like ``` {'url': 'https://replicate.com/openai/gpt-4.1', 'owner': 'openai', 'name': 'gpt-4.1', 'description': "OpenAI's Flagship GPT model for complex tasks." ... } ``` => Error. Please add some rules to this. Thank you. ### ✔️ Error log ``` Model {model_name}:{version} is not a Text Generation model. ```
yindo added the bug label 2026-02-16 10:19:04 -05:00
yindo closed this issue 2026-02-16 10:19:04 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 17, 2025):

Hi, @hellpoethero. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that in Dify v1.4.1, the Replicate plugin rejects some valid models with the error "Model {model_name}:{version} is not a Text Generation model."
  • The problem stems from the plugin's limited checks to identify large language models (LLMs), causing false negatives.
  • There have been no further comments or updates on this issue since your report.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here.
  • If I don’t hear back within 5 days, I will automatically close this issue.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 17, 2025): Hi, @hellpoethero. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that in Dify v1.4.1, the Replicate plugin rejects some valid models with the error "Model {model_name}:{version} is not a Text Generation model." - The problem stems from the plugin's limited checks to identify large language models (LLMs), causing false negatives. - There have been no further comments or updates on this issue since your report. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here. - If I don’t hear back within 5 days, I will automatically close this issue. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#345