Skip to content

Conversation

@HaKIMus
Copy link
Contributor

@HaKIMus HaKIMus commented Oct 22, 2025

Q A
Bug fix? yes
New feature? no
Docs? no
Issues Fix #585
License MIT

Context: #585 (comment)

Summary: Nullable fields must be present in the required list of their parent output structure, otherwise platforms (like openai) will reject the call.

Proof of work: #585 (comment)

structured-output-union-types.php output:

file:///~/ai/examples/openai/structured-output-union-types.php#L33 Symfony\AI\Fixtures\StructuredOutput\UnionType\UnionTypeDtofile:///~/ai/fixtures/StructuredOutput/UnionType/UnionTypeDto.php#L14 {#310
  +time: Symfony\AI\Fixtures\StructuredOutput\UnionType\HumanReadableTimeUnionfile:///~/ai/fixtures/StructuredOutput/UnionType/HumanReadableTimeUnion.php#L14 {#316
    +readableTime: "2023-10-07T19:32:10Z"
  }
}

@carsonbot carsonbot changed the title Feature/treat nullable fiels as required Feature/treat nullable fiels as required Oct 22, 2025
@HaKIMus HaKIMus changed the title Feature/treat nullable fiels as required [Platform] Feature/treat nullable fiels as required Oct 22, 2025
@HaKIMus HaKIMus changed the title [Platform] Feature/treat nullable fiels as required [Platform] Feature/treat nullable fields as required Oct 22, 2025
Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's also my knowledge, all fields needs to be in the required section 👍🏻

@carsonbot carsonbot changed the title [Platform] Feature/treat nullable fields as required Feature/treat nullable fields as required Oct 23, 2025
@chr-hertel chr-hertel force-pushed the feature/treat-nullable-fiels-as-required branch from b43ab60 to 57d9b91 Compare October 23, 2025 17:38
@chr-hertel
Copy link
Member

Thanks for the fast response and fix!

@chr-hertel chr-hertel merged commit bafc7b9 into symfony:main Oct 23, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants