Skip to content

fix: handle null summary_index_setting in KnowledgeIndexNodeData#36355

Open
EvanYao826 wants to merge 1 commit into
langgenius:mainfrom
EvanYao826:fix/summary-index-setting-null
Open

fix: handle null summary_index_setting in KnowledgeIndexNodeData#36355
EvanYao826 wants to merge 1 commit into
langgenius:mainfrom
EvanYao826:fix/summary-index-setting-null

Conversation

@EvanYao826
Copy link
Copy Markdown
Contributor

Problem

When creating a Knowledge Pipeline without summary indexing configured, the summary_index_setting field is sent as {"enable": null} instead of null. This causes Pydantic validation to fail:

4 validation errors for KnowledgeIndexNodeData
summary_index_setting.enable Input should be a valid boolean [type=bool_type, input_value=None]

Fix

Added a field_validator with mode="before" to KnowledgeIndexNodeData that normalizes dicts with enable=None (or missing enable) to None.

Fixes #36233

When summary_index_setting is a dict with enable=None (e.g. from a
Knowledge Pipeline without summary indexing configured), Pydantic
validation fails because enable expects bool, not None.

Added a field_validator to normalize dicts with enable=None to None.

Fixes langgenius#36233
@EvanYao826 EvanYao826 requested a review from QuantumGhost as a code owner May 18, 2026 15:05
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 0.00% 44.43% +44.43%
Strict coverage 0.00% 43.95% +43.95%
Typed symbols 0 22,535 +22,535
Untyped symbols 0 28,498 +28,498
Modules 0 2561 +2,561

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Knowledge Base node fails with 4 validation errors for KnowledgeIndexNodeData when summary_index_setting is null

1 participant