Skip to content

v1.14.2: /datasets/indexing-estimate 400 - enable: null in summary_index_setting causes validation error #36536

@P1K3S

Description

@P1K3S

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

v1.14.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Create a new dataset and save it.
  2. Enter the existing dataset and try to upload a file (such as TXT/MD).
  3. The frontend automatically calls /console/api/datasets/indexing-estimate.
  4. The interface returns 400 Bad Request and cannot continue.

✔️ Expected Behavior

The file upload and indexing estimation functions should work normally in both new datasets and existing datasets. The frontend should not pass invalid null values to the backend.

❌ Actual Behavior

Actual Behavior

When uploading files in an existing dataset, the frontend automatically adds the field summary_index_setting: {"enable": null} to the request body. The backend performs strict Boolean verification, so null is regarded as an invalid parameter, resulting in a 400 error.

Normal request (New dataset, no error)

{
    "info_list":{"data_source_type":"upload_file","file_info_list":{"file_ids":["3e8681d8-7188-4794-94b7-47eb65bcaefc"]}},
    "indexing_technique":"high_quality",
    "process_rule":{"rules":{"pre_processing_rules":[{"id":"remove_extra_spaces","enabled":true},{"id":"remove_urls_emails","enabled":false}],"segmentation":{"separator":"\n\n","max_tokens":1024,"chunk_overlap":50}},
    "mode":"custom",
    "doc_form":"text_model",
    "doc_language":"Chinese Simplified"
}

Faulty request (Existing dataset, throw error)

{
    "info_list":{"data_source_type":"upload_file","file_info_list":{"file_ids":["4e4b85e3-4c36-4f4d-a7d7-27d4a94759d0"]}},
    "indexing_technique":"high_quality",
    "process_rule":{"rules":{"pre_processing_rules":[{"id":"remove_extra_spaces","enabled":true},{"id":"remove_urls_emails","enabled":false}],"segmentation":{"separator":"\n\n","max_tokens":1024,"chunk_overlap":50}},
    "mode":"custom",
    "summary_index_setting":{"enable":null,"model_name":null,"model_provider_name":null,"summary_prompt":null},
    "doc_form":"text_model",
    "doc_language":"Chinese Simplified",
    "dataset_id":"56feabbb-d845-431c-9833-6cbf276cf9a9"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions