Skip to content

fix(workflow): dump validated schemas in JSON mode - #6750

Open
a2105z wants to merge 1 commit into
google:mainfrom
a2105z:fix/output-schema-json-mode
Open

fix(workflow): dump validated schemas in JSON mode#6750
a2105z wants to merge 1 commit into
google:mainfrom
a2105z:fix/output-schema-json-mode

Conversation

@a2105z

@a2105z a2105z commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Use model_dump(mode="json") when converting validated node schema results to dicts so when_used="json" serializers run and values like Decimal / datetime / non-str Enum stay JSON-serializable
  • Align BaseNode._to_serializable, validate_node_data, validate_schema, and resume-response dumping with the documented Event.output contract
  • Add regression coverage for the reported Decimal case plus datetime/Enum

Fixes #6747

Test plan

Python-mode model_dump left Decimal/datetime/Enum values that break
Event.output JSON serialization despite docs promising JSON-safe dicts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

output_schema validation dumps in pydantic python mode, so the node result is not JSON-serializable

2 participants