Long Conversation Variable Descriptions Cause "Internal Server Error" When Editing Chatflow #17176

Closed
opened 2026-02-21 19:32:14 -05:00 by yindo · 0 comments
Owner

Originally created by @QuantumGhost on GitHub (Sep 11, 2025).

Originally assigned to: @QuantumGhost on GitHub.

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

1.8.1

Cloud or Self Hosted

Cloud

Steps to reproduce

Import the following DSL and edit it.

DSL
app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: conversation variable desc length
  use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
  type: marketplace
  value:
    marketplace_plugin_unique_identifier: langgenius/openai:0.1.0@539dc0dde8ecaa84e61b8eeb154c3bb7fbc9caa80afd83763dd5860a725d2742
kind: app
version: 0.4.0
workflow:
  conversation_variables:
  - description: =====94a7f93b7d03ac3405c3fb7da00705b65265f3f01620976a2fb22dbeb8e26ea77f1c4a54b052e6c02a5f03cf0a2dcc809dd80771bfe1401a4e7cf99aeae1f8fbf8692750b414ea541caa0c0816cce948f54812a1c33ce48b6d1f98024f103b9bcff6aaca2af723a6cc1c90fd8446db60588ff22a2ea1b443993fec7200a5f46474a9===
    id: 091bfe21-8e0e-4f2d-b1ef-5a9429d6b5b5
    name: test
    selector:
    - conversation
    - test
    value: '1234'
    value_type: string
  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:
        sourceType: start
        targetType: llm
      id: 1757581230524-llm
      source: '1757581230524'
      sourceHandle: source
      target: llm
      targetHandle: target
      type: custom
    - data:
        sourceType: llm
        targetType: answer
      id: llm-answer
      source: llm
      sourceHandle: source
      target: answer
      targetHandle: target
      type: custom
    nodes:
    - data:
        desc: ''
        selected: false
        title: Start
        type: start
        variables: []
      height: 54
      id: '1757581230524'
      position:
        x: 80
        y: 282
      positionAbsolute:
        x: 80
        y: 282
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        memory:
          query_prompt_template: '{{#sys.query#}}


            {{#sys.files#}}'
          role_prefix:
            assistant: ''
            user: ''
          window:
            enabled: false
            size: 10
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-3.5-turbo-0125
          provider: langgenius/openai/openai
        prompt_template:
        - role: system
          text: ''
        selected: false
        title: LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 90
      id: llm
      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: 680
        y: 282
      positionAbsolute:
        x: 680
        y: 282
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: 0
      y: 0
      zoom: 1

Problem Description

Currently, conversation variables in Dify have no length limit for their descriptions, allowing users to create variables with arbitrarily long descriptions. However, draft variables are restricted to a maximum of 256 characters.

When fetching draft variables for conversation variables during the drafting process, the system copies conversation variables to draft variables, including their descriptions as-is. Due to this length mismatch, the operation can fail and result in an "Internal Server Error" when attempting to save draft variables.

Additionally, excessively long descriptions may cause performance issues since conversation variable descriptions are stored inline as part of the workflow graph.

✔️ Expected Behavior

No error occurred while editing chatflow.

Actual Behavior

A popup shows while editing chatflow.

Image
Originally created by @QuantumGhost on GitHub (Sep 11, 2025). Originally assigned to: @QuantumGhost on GitHub. ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.8.1 ### Cloud or Self Hosted Cloud ### Steps to reproduce Import the following DSL and edit it. <details> <summary>DSL</summary> ```yaml app: description: '' icon: 🤖 icon_background: '#FFEAD5' mode: advanced-chat name: conversation variable desc length use_icon_as_answer_icon: false dependencies: - current_identifier: null type: marketplace value: marketplace_plugin_unique_identifier: langgenius/openai:0.1.0@539dc0dde8ecaa84e61b8eeb154c3bb7fbc9caa80afd83763dd5860a725d2742 kind: app version: 0.4.0 workflow: conversation_variables: - description: =====94a7f93b7d03ac3405c3fb7da00705b65265f3f01620976a2fb22dbeb8e26ea77f1c4a54b052e6c02a5f03cf0a2dcc809dd80771bfe1401a4e7cf99aeae1f8fbf8692750b414ea541caa0c0816cce948f54812a1c33ce48b6d1f98024f103b9bcff6aaca2af723a6cc1c90fd8446db60588ff22a2ea1b443993fec7200a5f46474a9=== id: 091bfe21-8e0e-4f2d-b1ef-5a9429d6b5b5 name: test selector: - conversation - test value: '1234' value_type: string 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: sourceType: start targetType: llm id: 1757581230524-llm source: '1757581230524' sourceHandle: source target: llm targetHandle: target type: custom - data: sourceType: llm targetType: answer id: llm-answer source: llm sourceHandle: source target: answer targetHandle: target type: custom nodes: - data: desc: '' selected: false title: Start type: start variables: [] height: 54 id: '1757581230524' position: x: 80 y: 282 positionAbsolute: x: 80 y: 282 sourcePosition: right targetPosition: left type: custom width: 244 - data: context: enabled: false variable_selector: [] desc: '' memory: query_prompt_template: '{{#sys.query#}} {{#sys.files#}}' role_prefix: assistant: '' user: '' window: enabled: false size: 10 model: completion_params: temperature: 0.7 mode: chat name: gpt-3.5-turbo-0125 provider: langgenius/openai/openai prompt_template: - role: system text: '' selected: false title: LLM type: llm variables: [] vision: enabled: false height: 90 id: llm 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: 680 y: 282 positionAbsolute: x: 680 y: 282 sourcePosition: right targetPosition: left type: custom width: 244 viewport: x: 0 y: 0 zoom: 1 ``` </details> #### Problem Description Currently, conversation variables in Dify have no length limit for their descriptions, allowing users to create variables with arbitrarily long descriptions. However, draft variables are restricted to a maximum of 256 characters. When fetching draft variables for conversation variables during the drafting process, the system copies conversation variables to draft variables, including their descriptions as-is. Due to this length mismatch, the operation can fail and result in an "Internal Server Error" when attempting to save draft variables. Additionally, excessively long descriptions may cause performance issues since conversation variable descriptions are stored inline as part of the workflow graph. ### ✔️ Expected Behavior No error occurred while editing chatflow. ### ❌ Actual Behavior A popup shows while editing chatflow. <img width="590" height="238" alt="Image" src="https://github.com/user-attachments/assets/47403243-bd69-44ab-9d25-36d28b433649" />
yindo added the 🐞 bugcloud labels 2026-02-21 19:32:14 -05:00
yindo closed this issue 2026-02-21 19:32:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#17176