straight-sundown-84319
11/20/2025, 3:25 PMexclude_none when dumping some of our pydantic models? (e.g.: https://github.com/OpenHands/software-agent-sdk/blame/7fed9444c88f43daeb9ad395fcc14161602849b3/openhands-sdk/openhands/sdk/conversation/state.py#L141C22-L141C22)
Was it just to save space or was there another reason?
This causes issues when None is an accepted value which is not the default. For example:
https://github.com/OpenHands/software-agent-sdk/blob/7fed9444c88f43daeb9ad395fcc14[ā¦]161602849b3/openhands-sdk/openhands/sdk/context/skills/skill.py
In skill, the trigger can be None (Meaning the Skill is always active), but when serialized this value will be excluded if it is None, so that the default will be used - but there is no default!
I could:
⢠Update all fields that permit None and do not have a default value to have a default value of None š«
⢠Remove the exclude_none š
I favor removing the exclude_none, as setting a default of None may not be desired in all cases.calm-artist-7206
11/20/2025, 4:16 PMstraight-sundown-84319
11/20/2025, 4:17 PMstraight-sundown-84319
11/20/2025, 4:17 PMcalm-artist-7206
11/20/2025, 4:20 PMstraight-sundown-84319
11/20/2025, 4:23 PMstraight-sundown-84319
11/20/2025, 4:32 PMchilly-france-44439
11/20/2025, 4:39 PMstraight-sundown-84319
11/20/2025, 4:40 PMchilly-france-44439
11/20/2025, 4:41 PM