Self Checks
Dify version
v1.14.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
- Create a new dataset and save it.
- Enter the existing dataset and try to upload a file (such as TXT/MD).
- The frontend automatically calls
/console/api/datasets/indexing-estimate.
- 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"
}
Self Checks
Dify version
v1.14.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
/console/api/datasets/indexing-estimate.✔️ 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
nullvalues 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, sonullis 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" }