langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
47.76k stars 6.8k forks source link

"Add Model" is not adding models to the model list. #9255

Open taowang1993 opened 3 hours ago

taowang1993 commented 3 hours ago

Self Checks

Dify version

0.9.1

Cloud or Self Hosted

Cloud, Self Hosted (Docker)

Steps to reproduce

The "Add Model" feature does not work.

I tried many many times.

I expect it will add a custom model to the model list, but it doesn't.

image

The docs says predefined-model + customizable-model can coexist.

Does that mean I need to use the same base url and api key for predefined and custom?

https://docs.dify.ai/guides/model-configuration/new-provider

The reason I ask is that using different base url and api key don't seem to work.

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 3 hours ago

It seems like you're encountering an issue with adding a custom model in Dify. Here are some relevant points and solutions that might help:

  1. Predefined vs. Custom Models: For predefined models, you only need unified provider credentials (a single API key and base URL). For custom models, you need to configure credentials for each model, which may require different API keys or URLs. They can coexist, but they don't need to share the same base URL and API key [1][2].

  2. Steps to Add a Custom Model:

    • Create a provider YAML file according to the Provider Schema.
    • Implement the provider code and add model type modules.
    • Write and run test code to ensure everything is configured correctly [1].
  3. Similar Issues: There was a similar issue where users had trouble with model configuration. The solution involved ensuring correct proxy configuration and API base URL updates [3].

Make sure your configurations align with these guidelines, and check if there are any errors in your setup. If the problem persists, reviewing the proxy settings and API base URL might help.

To continue talking to Dosu, mention @dosu.