Self Checks
To make sure we get to you in time, please check the following :)
Dify version
See about section in Dify console
Plugin version
See this in the marketplace, it's the version of the plugin you are using
Cloud or Self Hosted
How / Where was Dify installed from?
- Cloud
- Self Hosted (Docker)
- Self Hosted (Source)
Steps to reproduce
When a Python plugin contains both pyproject.toml and requirements.txt, the daemon currently prioritizes pyproject.toml in setup_python_environment.go and runs uv sync. In practice, this means requirements.txt is ignored during deployment.
This becomes a problem when uv.lock is not committed. Some plugins, such as models/gemini, had uv.lock excluded by .gitignore, so the deployment environment cannot use a locked dependency graph.
The issue is made worse because the daemon runs uv sync without --frozen. If uv.lock is missing, uv resolves dependencies again from the version ranges in pyproject.toml, which can pull different package versions on each deployment.
Current behavior:
pyproject.toml completely overrides requirements.txt
requirements.txt may exist but is effectively unused during deploy
- missing
uv.lock leads to dynamic dependency resolution
- deployments are not reproducible and may break without any plugin code change
Expected behavior:
- if
pyproject.toml is used, uv.lock should be required and committed
- deployment should run
uv sync --frozen
- deployment should fail fast when
pyproject.toml exists but uv.lock is missing
models/gemini is a concrete example where this created dependency drift risk.
✔️ Error log
Please include the error log here, wrap it in a code block.
If applicable, paste the error log here.
Self Checks
To make sure we get to you in time, please check the following :)
Dify version
See about section in Dify console
Plugin version
See this in the marketplace, it's the version of the plugin you are using
Cloud or Self Hosted
How / Where was Dify installed from?
Steps to reproduce
When a Python plugin contains both
pyproject.tomlandrequirements.txt, the daemon currently prioritizespyproject.tomlinsetup_python_environment.goand runsuv sync. In practice, this meansrequirements.txtis ignored during deployment.This becomes a problem when
uv.lockis not committed. Some plugins, such asmodels/gemini, haduv.lockexcluded by.gitignore, so the deployment environment cannot use a locked dependency graph.The issue is made worse because the daemon runs
uv syncwithout--frozen. Ifuv.lockis missing,uvresolves dependencies again from the version ranges inpyproject.toml, which can pull different package versions on each deployment.Current behavior:
pyproject.tomlcompletely overridesrequirements.txtrequirements.txtmay exist but is effectively unused during deployuv.lockleads to dynamic dependency resolutionExpected behavior:
pyproject.tomlis used,uv.lockshould be required and committeduv sync --frozenpyproject.tomlexists butuv.lockis missingmodels/geminiis a concrete example where this created dependency drift risk.✔️ Error log
Please include the error log here, wrap it in a code block.
If applicable, paste the error log here.