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!

…tConverter Signed-off-by: Dmitry Sulman <dmitry.sulman@gmail.com>
@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 <dmitry.sulman@gmail.com> (cherry picked from commit 83e2785)
juntae6942 pushed a commit to juntae6942/spring-ai that referenced this pull request Aug 7, 2025
…tConverter (spring-projects#3900) Fixes spring-projects#3900 Auto-cherry-pick to 1.0.x Signed-off-by: Dmitry Sulman <dmitry.sulman@gmail.com>
scionaltera pushed a commit to scionaltera/spring-ai that referenced this pull request Sep 3, 2025
…tConverter (spring-projects#3900) Fixes spring-projects#3900 Auto-cherry-pick to 1.0.x Signed-off-by: Dmitry Sulman <dmitry.sulman@gmail.com>
chedim pushed a commit to couchbaselabs/spring-ai that referenced this pull request Sep 19, 2025
…tConverter (spring-projects#3900) Fixes spring-projects#3900 Auto-cherry-pick to 1.0.x Signed-off-by: Dmitry Sulman <dmitry.sulman@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants