Help | Empty Optional Fields Behavior Changed When Upgrading From v0.6.16 #6394

Closed
opened 2026-02-21 18:15:33 -05:00 by yindo · 1 comment
Owner

Originally created by @laipz8200 on GitHub (Oct 29, 2024).

Originally assigned to: @laipz8200 on GitHub.

Discussed in https://github.com/langgenius/dify/discussions/9782

Originally posted by rxue92 October 24, 2024

Self Checks

  • 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.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Background

I've deployed the community version 0.6.16 (Docker) and created numerous workflows. As I wanted to utilize the parallel workflow and external knowledge base features, I deployed version 0.10.1 on another device using a backup from my 0.6.16 platform (following the upgrade instructions in the release notes).
In my typical workflow setup, the start node contains both required and optional text fields (including paragraph type), which I use to create system/user prompts in LLM nodes.

Issue Description

I've noticed a difference in how empty optional fields are handled between versions:

  • In v0.6.16: When an optional field is left empty (either through the web UI or API requests), the field value is an empty string, resulting in clean LLM prompts.
  • In v0.10.1: Empty optional fields are represented as null, causing the LLM prompt to display placeholder strings like "1729665643087.data_format".

This behavior difference is also reflected in the start node inputs.

Question

Is there a way to upgrade my v0.6.16 platform to the latest version without having to modify all existing workflows to address this empty field handling issue?

Reproducing the problem

Demo workflow

This workflow use llm to capitalize English letters in user prompt. Variable Input is required whereas variable data_format is optional.

Workflow DSL is enclosed.

workflow

Run the workflow

Leave data_format blank.

run the flow via web ui

On 0.6.16

image

On 0.10.1

image

2. Additional context or comments

Demo workflow DSL.

app:
  description: ''
  icon: "\U0001F916"
  icon_background: '#FFEAD5'
  mode: workflow
  name: ceshi
kind: app
version: 0.1.0
workflow:
  environment_variables: []
  features:
    file_upload:
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
    opening_statement: ''
    retriever_resource:
      enabled: false
    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:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1729665643087-source-1729665649392-target
      source: '1729665643087'
      sourceHandle: source
      target: '1729665649392'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: end
      id: 1729665649392-source-1729665651579-target
      source: '1729665649392'
      sourceHandle: source
      target: '1729665651579'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: "\u5F00\u59CB"
        type: start
        variables:
        - label: input
          max_length: 48
          options: []
          required: true
          type: paragraph
          variable: input
        - label: data_format
          max_length: 48
          options: []
          required: false
          type: text-input
          variable: data_format
      height: 116
      id: '1729665643087'
      position:
        x: 86.06286626604162
        y: 282
      positionAbsolute:
        x: 86.06286626604162
        y: 282
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: deepseek-chat
          provider: deepseek
        prompt_template:
        - id: c6aa4d5a-4668-4ea9-b17b-a929bb210116
          role: system
          text: "\u5C06\u6240\u6709\u82F1\u6587\u5B57\u6BCD\u5927\u5199\u540E\u8FD4\
            \u56DE"
        - id: d702f0d9-a423-4a79-af22-0c34a8f3cd87
          role: user
          text: '{{#1729665643087.input#}}


            ----------


            {{#1729665643087.data_format#}}'
        selected: true
        title: LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: '1729665649392'
      position:
        x: 382.4842834334896
        y: 282
      positionAbsolute:
        x: 382.4842834334896
        y: 282
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        outputs:
        - value_selector:
          - '1729665649392'
          - text
          variable: text
        selected: false
        title: "\u7ED3\u675F"
        type: end
      height: 90
      id: '1729665651579'
      position:
        x: 684.9685668669792
        y: 282
      positionAbsolute:
        x: 684.9685668669792
        y: 282
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: 288.42773067755536
      y: 406.9535163136548
      zoom: 0.8705505632961242
Originally created by @laipz8200 on GitHub (Oct 29, 2024). Originally assigned to: @laipz8200 on GitHub. ### Discussed in https://github.com/langgenius/dify/discussions/9782 <div type='discussions-op-text'> <sup>Originally posted by **rxue92** October 24, 2024</sup> ### Self Checks - [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. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. ## Background I've deployed the community version 0.6.16 (Docker) and created numerous workflows. As I wanted to utilize the parallel workflow and external knowledge base features, I deployed version 0.10.1 on another device using a backup from my 0.6.16 platform (following the upgrade instructions in the release notes). In my typical workflow setup, the start node contains both required and optional text fields (including paragraph type), which I use to create system/user prompts in LLM nodes. ## Issue Description I've noticed a difference in how empty optional fields are handled between versions: - In v0.6.16: When an optional field is left empty (either through the web UI or API requests), the field value is an empty string, resulting in clean LLM prompts. - In v0.10.1: Empty optional fields are represented as null, causing the LLM prompt to display placeholder strings like "1729665643087.data_format". This behavior difference is also reflected in the start node inputs. ## Question Is there a way to upgrade my v0.6.16 platform to the latest version without having to modify all existing workflows to address this empty field handling issue? ## Reproducing the problem ### Demo workflow This workflow use llm to capitalize English letters in user prompt. Variable `Input` is required whereas variable `data_format` is optional. > Workflow DSL is enclosed. ![workflow](https://github.com/user-attachments/assets/e12c8270-7dbc-49a4-b336-6fa5513019c7) ### Run the workflow Leave `data_format` blank. ![run the flow via web ui](https://github.com/user-attachments/assets/0e918c7b-ba63-44d6-9e75-45ce8a4f4114) ### On 0.6.16 ![image](https://github.com/user-attachments/assets/036bd5d4-534f-44f4-a300-6d58fca9c7e7) ### On 0.10.1 ![image](https://github.com/user-attachments/assets/228c8444-9810-4c54-91b8-ea496ed172b6) ### 2. Additional context or comments Demo workflow DSL. ```yaml app: description: '' icon: "\U0001F916" icon_background: '#FFEAD5' mode: workflow name: ceshi kind: app version: 0.1.0 workflow: environment_variables: [] features: file_upload: image: enabled: false number_limits: 3 transfer_methods: - local_file - remote_url opening_statement: '' retriever_resource: enabled: false 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: isInIteration: false sourceType: start targetType: llm id: 1729665643087-source-1729665649392-target source: '1729665643087' sourceHandle: source target: '1729665649392' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: llm targetType: end id: 1729665649392-source-1729665651579-target source: '1729665649392' sourceHandle: source target: '1729665651579' targetHandle: target type: custom zIndex: 0 nodes: - data: desc: '' selected: false title: "\u5F00\u59CB" type: start variables: - label: input max_length: 48 options: [] required: true type: paragraph variable: input - label: data_format max_length: 48 options: [] required: false type: text-input variable: data_format height: 116 id: '1729665643087' position: x: 86.06286626604162 y: 282 positionAbsolute: x: 86.06286626604162 y: 282 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: context: enabled: false variable_selector: [] desc: '' model: completion_params: temperature: 0.7 mode: chat name: deepseek-chat provider: deepseek prompt_template: - id: c6aa4d5a-4668-4ea9-b17b-a929bb210116 role: system text: "\u5C06\u6240\u6709\u82F1\u6587\u5B57\u6BCD\u5927\u5199\u540E\u8FD4\ \u56DE" - id: d702f0d9-a423-4a79-af22-0c34a8f3cd87 role: user text: '{{#1729665643087.input#}} ---------- {{#1729665643087.data_format#}}' selected: true title: LLM type: llm variables: [] vision: enabled: false height: 98 id: '1729665649392' position: x: 382.4842834334896 y: 282 positionAbsolute: x: 382.4842834334896 y: 282 selected: true sourcePosition: right targetPosition: left type: custom width: 244 - data: desc: '' outputs: - value_selector: - '1729665649392' - text variable: text selected: false title: "\u7ED3\u675F" type: end height: 90 id: '1729665651579' position: x: 684.9685668669792 y: 282 positionAbsolute: x: 684.9685668669792 y: 282 selected: false sourcePosition: right targetPosition: left type: custom width: 244 viewport: x: 288.42773067755536 y: 406.9535163136548 zoom: 0.8705505632961242 ``` </div>
yindo closed this issue 2026-02-21 18:15:33 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 29, 2024):

I didn't find any similar threads related to the issue you're experiencing.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 29, 2024): <!-- Answer --> I didn't find any similar threads related to the issue you're experiencing. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6394