Exported chat app DSL omits the rerank model plugin dependency

Open
#47,203 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Paranoid203 is already working on this.

Since Nov 25, 2026.

  • #47205 by @Paranoid203 — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start in AppDslService._extract_dependencies_from_model_config, which looks for reranking_model inside each dataset_configs.datasets.datasets entry. Compare it with DatasetConfigManager, where reranking_provider_name is a string on dataset_configs itself, and with web/models/debug.ts. Done when an exported chat app DSL lists the rerank plugin in dependencies and import reports it as missing. PR #47205 already targets this, so review it before starting.

Written by the indexing model from the issue text.

Description

Self Checks
  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.
Dify version

main (724ac15121)

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce
  1. Install a rerank model provider plugin (for example Cohere) and an LLM provider plugin (for example OpenAI).
  2. Create a Chatbot app with a knowledge base in Context, set retrieval to Rerank Model and pick the Cohere rerank model.
  3. Export the app as DSL and look at the dependencies section, or import the DSL into a workspace that does not have the Cohere plugin.
✔️ Expected Behavior

The exported dependencies include the Cohere plugin, and importing the DSL into a workspace without it prompts to install it, as it does for the knowledge retrieval node in workflow apps.

❌ Actual Behavior

Only the LLM provider (and tools) are listed. AppDslService._extract_dependencies_from_model_config looks for reranking_model inside each dataset_configs.datasets.datasets entry and expects reranking_provider_name to be a dict with a provider key. The entries only hold {"dataset": {"enabled", "id"}}, and the rerank model is configured on dataset_configs itself with reranking_provider_name as a string (see DatasetConfigManager and web/models/debug.ts), so the lookup never matches. The import side then cannot report the missing plugin.

Dominant language
Python
Stars
162k
Forks
25.6k
Avg merge
15h 9m
Merged PRs (30d)
606

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from langgenius/dify

All issues in langgenius/dify

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.