Skip to content

Conversation

dmitrysulman
Copy link
Contributor

It is stated in the Integrating with BeanOutputConverter Utilities section of the OpenAI ChatModel documentation that

Kotlin reflection is used to infer which property are required or not based on the nullability of types and default values of parameters, so for most use case @get:JsonProperty(required = true) is not needed.

However, this is not true for BeanOutputConverter, because KotlinModule that infers the required Kotlin properties is used only in the ModelOptionsUtils class.

This PR fixes the issue by adding Kotlin class support to the BeanOutputConverter.

@dmitrysulman
Copy link
Contributor Author

Hi @ilayaperumalg, kindly asking if there’s a chance to review and approve this PR when you have time. Thank you!

@dmitrysulman dmitrysulman force-pushed the add-kotlin-module-to-bean-output-converter branch from 64fc628 to 48bb5a8 Compare August 6, 2025 16:40
@sobychacko sobychacko added this to the 1.1.0.M1 milestone Aug 6, 2025
@sobychacko sobychacko merged commit 83e2785 into spring-projects:main Aug 6, 2025
2 checks passed
spring-builds pushed a commit that referenced this pull request Aug 6, 2025
…tConverter (#3900)

Fixes #3900

Signed-off-by: Dmitry Sulman <[email protected]>
(cherry picked from commit 83e2785)
juntae6942 pushed a commit to juntae6942/spring-ai that referenced this pull request Aug 7, 2025
scionaltera pushed a commit to scionaltera/spring-ai that referenced this pull request Sep 3, 2025
chedim pushed a commit to couchbaselabs/spring-ai that referenced this pull request Sep 19, 2025
Willam2004 pushed a commit to Willam2004/spring-ai that referenced this pull request Oct 11, 2025
…tConverter (spring-projects#3900)

Fixes spring-projects#3900

Auto-cherry-pick to 1.0.x

Signed-off-by: Dmitry Sulman <[email protected]>
Signed-off-by: 家娃 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants