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
46.87k stars 6.63k forks source link

Inconsistency across deployment mediums regarding Anthropic's Sonnet 3.5 model. #5549

Closed sid-newby closed 1 month ago

sid-newby commented 3 months ago

Self Checks

Dify version

0.6.11

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

The new Sonnet model ( claude-3-5-sonnet-20240620 ) is successfully returned as an option when configuring the provider (Anthropic API) after entering an API key in the cloud edition.

After performing the same operation with the docker deployment, all models except claude-3-5-sonnet-20240620 return. Google Chrome console reports 404, the web app throws an error modal at the top of the page.

Source code included with git repo contains /app/api/core/model_runtime/model_providers/anthropic/llm/claude-3-5-sonnet-20240620.yaml and _position.yaml contains definition for claude-3-5-sonnet-20240620.

Docker image does not contain the model's .yaml and the definition is missing from the position.yaml.

I was able to resolve this by simply modifying and saving the _position.yaml file and uploading my git source provided claude-3-5-sonnet-20240620.yaml to the llm directory under /anthropic.

In the same vein, I noticed the docker distribution has a number of vulnerabilities that i'd like to patch out. Do you guys maintain the image in that respect, or should I wait for updates and pull?

Thanks.

✔️ Expected Behavior

Consistency across web hosted, containerized and distributed source code and functionality.

❌ Actual Behavior

Troubleshooting and inconsistency across the mediums, leading to 3 hours of my life gone. 1  Localhost-Docker OpenAI Compatible Config Response 2  Localhost-Docker Anthropic Successful Configuration 3  Localhost-Docker Anthropic Fails to Return claude-3-5-sonnet-20240620 4  Cloud Hosted Model Anthropic Successfully Returns claude-3-5-sonnet-20240620 5  GitHub Source Code_ Model Definition _position yaml for Anthropic Configured for claude-3-5-sonnet-20240620 6  Docker Source Code_ Model Definition Anthropic Not Configured for claude-3-5-sonnet-20240620 7  Localhost-Docker Anthropic Now Returns claude-3-5-sonnet-20240620

crazywoola commented 3 months ago

After performing the same operation with the docker deployment, all models except claude-3-5-sonnet-20240620 return. Google Chrome console reports 404, the web app throws an error modal at the top of the page.

Hello, that's because we haven't tagged the new version. So it won't be able to display the the 3.5-sonnet as expected. That way you resolve this issue looks good to me.

In the same vein, I noticed the docker distribution has a number of vulnerabilities that i'd like to patch out. Do you guys maintain the image in that respect, or should I wait for updates and pull?

And we are working on it already.

Troubleshooting and inconsistency across the mediums, leading to 3 hours of my life gone.

:) Sorry about that, we do have differences between each other. The cloud version has some specific features like billing, but this is not shipped along with the self-hosted version(docker, source code). Next time you could use the latest tag to run the image, but we do not guarantee the stability ⚠️ because it's not an official release and it's triggered automatically.