Question Classifier node failed to run #14449

Closed
opened 2026-02-21 19:17:16 -05:00 by yindo · 19 comments
Owner

Originally created by @xzneozx96 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 search for existing issues, 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

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

  1. Create a new App or Edit an existing App with Question Classifier node
  2. Click Preview button to test the workflow

✔️ Expected Behavior

The workflow should run smoothly without any error on internal nodes

Actual Behavior

Workflow stopped at Question Classifier node due to below error:
Run failed: 'QuestionClassifierNodeData' object has no attribute 'structured_output_enabled'

This error suddenly happened today, everything was working fine yesterday. Please take a look

Image

Originally created by @xzneozx96 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 [search for existing issues](https://github.com/langgenius/dify/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 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce 1. Create a new App or Edit an existing App with Question Classifier node 2. Click Preview button to test the workflow ### ✔️ Expected Behavior The workflow should run smoothly without any error on internal nodes ### ❌ Actual Behavior Workflow stopped at Question Classifier node due to below error: **Run failed: 'QuestionClassifierNodeData' object has no attribute 'structured_output_enabled'** This error suddenly happened today, everything was working fine yesterday. Please take a look ![Image](https://github.com/user-attachments/assets/706e2f4d-a319-44a1-814c-87d517ab01e5)
yindo added the 🐞 bug label 2026-02-21 19:17:16 -05:00
yindo closed this issue 2026-02-21 19:17:16 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 5, 2025):

The error occurs because the QuestionClassifierNodeData class does not have a structured_output_enabled attribute in its implementation, nor is there any documentation or recent change indicating it should exist. This suggests something in your environment or workflow is expecting this attribute when it shouldn't be, possibly due to a mismatch between code and dependencies, or a recent update or rollback in your setup that introduced an inconsistency.

Try restarting your environment, clearing any caches, and ensuring all components (backend, frontend, and dependencies) are on the same version. If you recently pulled updates or changed branches, double-check that all migrations and builds have completed successfully. If the issue persists, look for any custom modifications or plugins that might be referencing this attribute.

Reference: "QuestionClassifierNodeData" class implementation

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jun 5, 2025): <!-- Answer --> The error occurs because the QuestionClassifierNodeData class does not have a structured_output_enabled attribute in its implementation, nor is there any documentation or recent change indicating it should exist. This suggests something in your environment or workflow is expecting this attribute when it shouldn't be, possibly due to a mismatch between code and dependencies, or a recent update or rollback in your setup that introduced an inconsistency. Try restarting your environment, clearing any caches, and ensuring all components (backend, frontend, and dependencies) are on the same version. If you recently pulled updates or changed branches, double-check that all migrations and builds have completed successfully. If the issue persists, look for any custom modifications or plugins that might be referencing this attribute. Reference: ["QuestionClassifierNodeData" class implementation](https://github.com/langgenius/dify/blob/85859b67237c28dbec67f73b7c8e7e8484c62800/api/core/workflow/nodes/question_classifier/entities.py) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/5486b239-af23-4892-89e4-1dbe760741e0?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5486b239-af23-4892-89e4-1dbe760741e0?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5486b239-af23-4892-89e4-1dbe760741e0?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5486b239-af23-4892-89e4-1dbe760741e0?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5486b239-af23-4892-89e4-1dbe760741e0?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5486b239-af23-4892-89e4-1dbe760741e0?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5486b239-af23-4892-89e4-1dbe760741e0?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/20725)
Author
Owner

@crazywoola commented on GitHub (Jun 6, 2025):

Please turn off the structured_output_enabled in the Question Classifier.

@crazywoola commented on GitHub (Jun 6, 2025): Please turn off the `structured_output_enabled ` in the Question Classifier.
Author
Owner

@xzneozx96 commented on GitHub (Jun 6, 2025):

structured_output_enabled

Hi,
Could u please share screenshot on where to turn this off? I have to date the code base directly or I can do it it the Studio UI?
I have a workflow that's working fine yesterday, but after I fetch latest code from upstream repo, the same workflow got broken

Thanks

@xzneozx96 commented on GitHub (Jun 6, 2025): > structured_output_enabled Hi, Could u please share screenshot on where to turn this off? I have to date the code base directly or I can do it it the Studio UI? I have a workflow that's working fine yesterday, but after I fetch latest code from upstream repo, the same workflow got broken Thanks
Author
Owner

@crazywoola commented on GitHub (Jun 6, 2025):

Image

@crazywoola commented on GitHub (Jun 6, 2025): ![Image](https://github.com/user-attachments/assets/529644cb-b368-4077-aa7e-2cc9a5d2e18f)
Author
Owner

@xzneozx96 commented on GitHub (Jun 6, 2025):

Image

Sorry, I do not see any option related to structured_output
Image

@xzneozx96 commented on GitHub (Jun 6, 2025): > ![Image](https://github.com/user-attachments/assets/529644cb-b368-4077-aa7e-2cc9a5d2e18f) Sorry, I do not see any option related to **structured_output** ![Image](https://github.com/user-attachments/assets/b42db908-d9ea-4a0f-9e66-7c001db4abe3)
Author
Owner

@crazywoola commented on GitHub (Jun 6, 2025):

I can not find the the same setting and I failed tried to reproduce this issue. Can you switch to another model provider to verify if this persists?

If this persists, please tell me the version of the open router plugin.

@crazywoola commented on GitHub (Jun 6, 2025): I can not find the the same setting and I failed tried to reproduce this issue. Can you switch to another model provider to verify if this persists? If this persists, please tell me the version of the open router plugin.
Author
Owner

@xzneozx96 commented on GitHub (Jun 6, 2025):

I can not find the the same setting and I failed tried to reproduce this issue. Can you switch to another model provider to verify if this persists?

If this persists, please tell me the version of the open router plugin.

I just switched to DeepSeek plugin (switch from Open Router plugin to DeepSeek plugin, not switching AI Models within Open Router provider) but the issue still persists. There is no such settings related to structured_output

For plugin version, it's 0.0.10 on Open Router and 0.0.5 on DeepSeek

@xzneozx96 commented on GitHub (Jun 6, 2025): > I can not find the the same setting and I failed tried to reproduce this issue. Can you switch to another model provider to verify if this persists? > > If this persists, please tell me the version of the open router plugin. I just switched to DeepSeek plugin (switch from Open Router plugin to DeepSeek plugin, not switching AI Models within Open Router provider) but the issue still persists. There is no such settings related to **structured_output** For plugin version, it's 0.0.10 on Open Router and 0.0.5 on DeepSeek
Author
Owner

@crazywoola commented on GitHub (Jun 6, 2025):

I can not find the the same setting and I failed tried to reproduce this issue. Can you switch to another model provider to verify if this persists?
If this persists, please tell me the version of the open router plugin.

I just switched to DeepSeek plugin (switch from Open Router plugin to DeepSeek plugin, not switching AI Models within Open Router provider) but the issue still persists. There is no such settings related to structured_output

For plugin version, it's 0.0.10 on Open Router and 0.0.5 on DeepSeek

Weird, is this a newly created workflow?

@crazywoola commented on GitHub (Jun 6, 2025): > > I can not find the the same setting and I failed tried to reproduce this issue. Can you switch to another model provider to verify if this persists? > > If this persists, please tell me the version of the open router plugin. > > I just switched to DeepSeek plugin (switch from Open Router plugin to DeepSeek plugin, not switching AI Models within Open Router provider) but the issue still persists. There is no such settings related to **structured_output** > > For plugin version, it's 0.0.10 on Open Router and 0.0.5 on DeepSeek Weird, is this a newly created workflow?
Author
Owner

@xzneozx96 commented on GitHub (Jun 6, 2025):

I can not find the the same setting and I failed tried to reproduce this issue. Can you switch to another model provider to verify if this persists?
If this persists, please tell me the version of the open router plugin.

I just switched to DeepSeek plugin (switch from Open Router plugin to DeepSeek plugin, not switching AI Models within Open Router provider) but the issue still persists. There is no such settings related to structured_output
For plugin version, it's 0.0.10 on Open Router and 0.0.5 on DeepSeek

Weird, is this a newly created workflow?

no, I created it yesterday and it was working yesterday, however, after I pull the latest update from the official repo (the main branch), the issue occurs, below is the logs I found on the server, please take a look

ERROR [Thread-3 (worker_with_context)] [node.py:74] - Node 1749191422050 failed to run Traceback (most recent call last): File "/app/api/core/workflow/nodes/base/node.py", line 72, in run result = self._run() ^^^^^^^^^^^ File "/app/api/core/workflow/nodes/question_classifier/question_classifier_node.py", line 51, in _run model_instance, model_config = self._fetch_model_config(node_data.model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/workflow/nodes/llm/node.py", line 557, in _fetch_model_config if self.node_data.structured_output_enabled: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/pydantic/main.py", line 991, in __getattr__ raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}') AttributeError: 'QuestionClassifierNodeData' object has no attribute 'structured_output_enabled'

@xzneozx96 commented on GitHub (Jun 6, 2025): > > > I can not find the the same setting and I failed tried to reproduce this issue. Can you switch to another model provider to verify if this persists? > > > If this persists, please tell me the version of the open router plugin. > > > > > > I just switched to DeepSeek plugin (switch from Open Router plugin to DeepSeek plugin, not switching AI Models within Open Router provider) but the issue still persists. There is no such settings related to **structured_output** > > For plugin version, it's 0.0.10 on Open Router and 0.0.5 on DeepSeek > > Weird, is this a newly created workflow? no, I created it yesterday and it was working yesterday, however, after I pull the latest update from the official repo (the **main** branch), the issue occurs, below is the logs I found on the server, please take a look `ERROR [Thread-3 (worker_with_context)] [node.py:74] - Node 1749191422050 failed to run Traceback (most recent call last): File "/app/api/core/workflow/nodes/base/node.py", line 72, in run result = self._run() ^^^^^^^^^^^ File "/app/api/core/workflow/nodes/question_classifier/question_classifier_node.py", line 51, in _run model_instance, model_config = self._fetch_model_config(node_data.model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/workflow/nodes/llm/node.py", line 557, in _fetch_model_config if self.node_data.structured_output_enabled: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/pydantic/main.py", line 991, in __getattr__ raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}') AttributeError: 'QuestionClassifierNodeData' object has no attribute 'structured_output_enabled'`
Author
Owner

@BenjaminX commented on GitHub (Jun 7, 2025):

Image

Parameter Extractor Node the same issue.

@BenjaminX commented on GitHub (Jun 7, 2025): ![Image](https://github.com/user-attachments/assets/0ea4c24b-3422-4784-97ee-9d0bdfbee9c0) Parameter Extractor Node the same issue.
Author
Owner

@StellaContrail commented on GitHub (Jun 7, 2025):

Maybe this is caused by the recent refactoring change from self._check_model_structured_output_support() to self.node_data.structured_output_enabled?

Previously, _check_model_structured_output_support() method checked whether the node was an LLMNode before attempting to access the property. However, the QuestionClassifier doesn't have the structured_output_enabled property, so it fails when trying to read its value.

I think it's not officially released yet though.

@StellaContrail commented on GitHub (Jun 7, 2025): Maybe this is caused by the recent refactoring change from `self._check_model_structured_output_support()` to `self.node_data.structured_output_enabled`? Previously, `_check_model_structured_output_support()` method checked whether the node was an `LLMNode` before attempting to access the property. However, the QuestionClassifier doesn't have the `structured_output_enabled` property, so it fails when trying to read its value. I think it's not officially released yet though.
Author
Owner

@xzneozx96 commented on GitHub (Jun 8, 2025):

Maybe this is caused by the recent refactoring change from self._check_model_structured_output_support() to self.node_data.structured_output_enabled?

Previously, _check_model_structured_output_support() method checked whether the node was an LLMNode before attempting to access the property. However, the QuestionClassifier doesn't have the structured_output_enabled property, so it fails when trying to read its value.

I think it's not officially released yet though.

Thanks for your information, seem this is an in-progress development, I already rolled back the code base to the latest release version for stability

@xzneozx96 commented on GitHub (Jun 8, 2025): > Maybe this is caused by the recent refactoring change from `self._check_model_structured_output_support()` to `self.node_data.structured_output_enabled`? > > Previously, `_check_model_structured_output_support()` method checked whether the node was an `LLMNode` before attempting to access the property. However, the QuestionClassifier doesn't have the `structured_output_enabled` property, so it fails when trying to read its value. > > I think it's not officially released yet though. Thanks for your information, seem this is an in-progress development, I already rolled back the code base to the latest release version for stability
Author
Owner

@StellaContrail commented on GitHub (Jun 8, 2025):

Since there doesn't seem to be a PR addressing this issue yet, it should be fixed before the next release?

@crazywoola
Could you please check if you can reproduce this issue (which is in main branch)? If necessary, I can open a new issue for it.

@StellaContrail commented on GitHub (Jun 8, 2025): Since there doesn't seem to be a PR addressing this issue yet, it should be fixed before the next release? @crazywoola Could you please check if you can reproduce this issue (which is in main branch)? If necessary, I can open a new issue for it.
Author
Owner

@QuantumGhost commented on GitHub (Jun 9, 2025):

QuestionClassifierNode is indeed broken.

Image

Minimal reproducible example:
app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: QuestionClassifier Test
  use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
  type: marketplace
  value:
    marketplace_plugin_unique_identifier: langgenius/openai:0.0.26@c1e643ac6a7732f6333a783320b4d3026fa5e31d8e7026375b98d44418d33f26
kind: app
version: 0.3.0
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      allowed_file_extensions:
      - .JPG
      - .JPEG
      - .PNG
      - .GIF
      - .WEBP
      - .SVG
      allowed_file_types:
      - image
      allowed_file_upload_methods:
      - local_file
      - remote_url
      enabled: false
      fileUploadConfig:
        audio_file_size_limit: 50
        batch_count_limit: 5
        file_size_limit: 15
        image_file_size_limit: 10
        video_file_size_limit: 100
        workflow_file_upload_limit: 10
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
      number_limits: 3
    opening_statement: ''
    retriever_resource:
      enabled: true
    sensitive_word_avoidance:
      enabled: false
    speech_to_text:
      enabled: false
    suggested_questions: []
    suggested_questions_after_answer:
      enabled: false
    text_to_speech:
      enabled: false
      language: ''
      voice: ''
  graph:
    edges:
    - data:
        isInLoop: false
        sourceType: start
        targetType: question-classifier
      id: 1749460092671-source-1749460099569-target
      source: '1749460092671'
      sourceHandle: source
      target: '1749460099569'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: question-classifier
        targetType: answer
      id: 1749460099569-1-answer-target
      source: '1749460099569'
      sourceHandle: '1'
      target: answer
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: question-classifier
        targetType: answer
      id: 1749460099569-2-answer-target
      source: '1749460099569'
      sourceHandle: '2'
      target: answer
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: Start
        type: start
        variables: []
      height: 54
      id: '1749460092671'
      position:
        x: 80
        y: 282
      positionAbsolute:
        x: 80
        y: 282
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        classes:
        - id: '1'
          name: Programming questions
        - id: '2'
          name: Other questions
        desc: ''
        instructions: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4
          provider: langgenius/openai/openai
        query_variable_selector:
        - sys
        - query
        selected: false
        title: Question Classifier
        topics: []
        type: question-classifier
        vision:
          enabled: false
      height: 172
      id: '1749460099569'
      position:
        x: 380
        y: 282
      positionAbsolute:
        x: 380
        y: 282
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '{{#llm.text#}}'
        desc: ''
        selected: false
        title: Answer
        type: answer
        variables: []
      height: 105
      id: answer
      position:
        x: 759
        y: 322
      positionAbsolute:
        x: 759
        y: 322
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: 0
      y: 0
      zoom: 1
@QuantumGhost commented on GitHub (Jun 9, 2025): `QuestionClassifierNode` is indeed broken. ![Image](https://github.com/user-attachments/assets/13fcdf54-d58c-4103-851d-51d8aab09923) <details> <summary>Minimal reproducible example: </summary> ```yaml app: description: '' icon: 🤖 icon_background: '#FFEAD5' mode: advanced-chat name: QuestionClassifier Test use_icon_as_answer_icon: false dependencies: - current_identifier: null type: marketplace value: marketplace_plugin_unique_identifier: langgenius/openai:0.0.26@c1e643ac6a7732f6333a783320b4d3026fa5e31d8e7026375b98d44418d33f26 kind: app version: 0.3.0 workflow: conversation_variables: [] environment_variables: [] features: file_upload: allowed_file_extensions: - .JPG - .JPEG - .PNG - .GIF - .WEBP - .SVG allowed_file_types: - image allowed_file_upload_methods: - local_file - remote_url enabled: false fileUploadConfig: audio_file_size_limit: 50 batch_count_limit: 5 file_size_limit: 15 image_file_size_limit: 10 video_file_size_limit: 100 workflow_file_upload_limit: 10 image: enabled: false number_limits: 3 transfer_methods: - local_file - remote_url number_limits: 3 opening_statement: '' retriever_resource: enabled: true sensitive_word_avoidance: enabled: false speech_to_text: enabled: false suggested_questions: [] suggested_questions_after_answer: enabled: false text_to_speech: enabled: false language: '' voice: '' graph: edges: - data: isInLoop: false sourceType: start targetType: question-classifier id: 1749460092671-source-1749460099569-target source: '1749460092671' sourceHandle: source target: '1749460099569' targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: question-classifier targetType: answer id: 1749460099569-1-answer-target source: '1749460099569' sourceHandle: '1' target: answer targetHandle: target type: custom zIndex: 0 - data: isInLoop: false sourceType: question-classifier targetType: answer id: 1749460099569-2-answer-target source: '1749460099569' sourceHandle: '2' target: answer targetHandle: target type: custom zIndex: 0 nodes: - data: desc: '' selected: false title: Start type: start variables: [] height: 54 id: '1749460092671' position: x: 80 y: 282 positionAbsolute: x: 80 y: 282 sourcePosition: right targetPosition: left type: custom width: 244 - data: classes: - id: '1' name: Programming questions - id: '2' name: Other questions desc: '' instructions: '' model: completion_params: temperature: 0.7 mode: chat name: gpt-4 provider: langgenius/openai/openai query_variable_selector: - sys - query selected: false title: Question Classifier topics: [] type: question-classifier vision: enabled: false height: 172 id: '1749460099569' position: x: 380 y: 282 positionAbsolute: x: 380 y: 282 sourcePosition: right targetPosition: left type: custom width: 244 - data: answer: '{{#llm.text#}}' desc: '' selected: false title: Answer type: answer variables: [] height: 105 id: answer position: x: 759 y: 322 positionAbsolute: x: 759 y: 322 selected: true sourcePosition: right targetPosition: left type: custom width: 244 viewport: x: 0 y: 0 zoom: 1 ``` </details>
Author
Owner

@StellaContrail commented on GitHub (Jun 9, 2025):

@QuantumGhost
Thank you for creating the PR so quickly!

I think this issue also affects KnowledgeRetrievalNode and ParameterExtractorNode, since these nodes also inherit from LLMNode. Would you be able to update these nodes in the same way? (Sorry if you're already addressing these in a diff PR)

@StellaContrail commented on GitHub (Jun 9, 2025): @QuantumGhost Thank you for creating the PR so quickly! I think this issue also affects `KnowledgeRetrievalNode` and `ParameterExtractorNode`, since these nodes also inherit from `LLMNode`. Would you be able to update these nodes in the same way? (Sorry if you're already addressing these in a diff PR)
Author
Owner

@QuantumGhost commented on GitHub (Jun 9, 2025):

@StellaContrail I have tested the KnowledgeRetrievalNode and wasn’t able to reproduce a similar issue. However, I agree that it would be a good idea to add the same property to KnowledgeRetrievalNode for consistency and future-proofing.

Regarding the ParameterExtractorNode, I plan to submit a separate PR to decouple it from LLMNode. Once decoupled, the structured_output_enabled property will no longer be needed for this node.

@QuantumGhost commented on GitHub (Jun 9, 2025): @StellaContrail I have tested the `KnowledgeRetrievalNode` and wasn’t able to reproduce a similar issue. However, I agree that it would be a good idea to add the same property to `KnowledgeRetrievalNode` for consistency and future-proofing. Regarding the `ParameterExtractorNode`, I plan to submit a separate PR to decouple it from `LLMNode`. Once decoupled, the `structured_output_enabled` property will no longer be needed for this node.
Author
Owner

@StellaContrail commented on GitHub (Jun 9, 2025):

Looking at the code, it seems that the knowledge retrieval error occurs only when completion mode is used.
https://github.com/langgenius/dify/blob/9114420/api/core/workflow/nodes/llm/node.py#L656-L787

elif isinstance(prompt_template, LLMNodeCompletionModelPromptTemplate):

Completion's a legacy feature, so I guess the impact is expected to be relatively low.
Either way, it would be better to fix it.

@StellaContrail commented on GitHub (Jun 9, 2025): Looking at the code, it seems that the knowledge retrieval error occurs only when completion mode is used. https://github.com/langgenius/dify/blob/9114420/api/core/workflow/nodes/llm/node.py#L656-L787 > elif isinstance(prompt_template, LLMNodeCompletionModelPromptTemplate): Completion's a legacy feature, so I guess the impact is expected to be relatively low. Either way, it would be better to fix it.
Author
Owner

@QuantumGhost commented on GitHub (Jun 9, 2025):

Hi @StellaContrail,

Thank you for pointing this out and for taking the time to look into the code. At the moment, I'm not deeply familiar with the functionality or specific implementation details of KnowledgeRetrievalNode. If you could provide a minimal reproducible example to help us narrow down the issue, that would be very helpful.

Additionally, if you're open to contributing a fix for this bug, we would greatly appreciate your support. Regardless, I truly value your observations and contributions to the project. Thanks again for bringing this to our attention!

@QuantumGhost commented on GitHub (Jun 9, 2025): Hi @StellaContrail, Thank you for pointing this out and for taking the time to look into the code. At the moment, I'm not deeply familiar with the functionality or specific implementation details of `KnowledgeRetrievalNode`. If you could provide a minimal reproducible example to help us narrow down the issue, that would be very helpful. Additionally, if you're open to contributing a fix for this bug, we would greatly appreciate your support. Regardless, I truly value your observations and contributions to the project. Thanks again for bringing this to our attention!
Author
Owner

@StellaContrail commented on GitHub (Jun 9, 2025):

@QuantumGhost
Thank you for your quick response and for providing a fix!
I think your fix resolves the issue, so there’s nothing further needed from my side.
Solid fix, indeed!

@StellaContrail commented on GitHub (Jun 9, 2025): @QuantumGhost Thank you for your quick response and for providing a fix! I think your fix resolves the issue, so there’s nothing further needed from my side. Solid fix, indeed!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14449