feat: migrate spring-ai to v2 - #1006
Conversation
| <dependency> | ||
| <groupId>com.github.victools</groupId> | ||
| <artifactId>jsonschema-module-swagger-2</artifactId> | ||
| <version>5.0.0</version> |
There was a problem hiding this comment.
- Why do you need to update the version? if it doesn't work with
4.38.0, that would mean it doesn't work for our customers out of the box, unless you pin the version in parent pom or openai pom. - Isn't this dependency already at version 5 in the parent pom? If not I would at least reuse the version number property
jsonschema-generator.version, or create one in the spring app if it's unrelated.
There was a problem hiding this comment.
moved to parent dependency management as you advised, thanks!
There was a problem hiding this comment.
But why did you need to update the version?
Jonas-Isr
left a comment
There was a problem hiding this comment.
I think there are some breaking changes for our users hidden in the code changes. While I think it is correct to change it that way and I don't think we can do anything better, we need to discuss if we are okay with a breaking change in convenience code in a minor version release or if we need to push for AI SDK major version 2.
This is a discussion we have to have with Junjie once we are certain how many and what breaking changes would be necessary. (At the least, we needs to add migration steps to the Compatibility Notes section of the release notes.)
# Conflicts: # docs/release_notes.md # pom.xml
# Conflicts: # docs/release_notes.md
| ```java | ||
| // Before | ||
| options.setInternalToolExecutionEnabled(true); | ||
| chatModel.call(prompt); | ||
|
|
||
| // After | ||
| ChatClient.builder(chatModel).build().prompt(prompt).call().chatResponse(); | ||
| ``` |
There was a problem hiding this comment.
| ```java | |
| // Before | |
| options.setInternalToolExecutionEnabled(true); | |
| chatModel.call(prompt); | |
| // After | |
| ChatClient.builder(chatModel).build().prompt(prompt).call().chatResponse(); | |
| ``` | |
| ```diff | |
| -options.setInternalToolExecutionEnabled(true); | |
| -chatModel.call(prompt); | |
| +ChatClient.builder(chatModel).build().prompt(prompt).call().chatResponse(); |
Diff is the right markdown format for those code samples
| <!-- Add --> | ||
| <dependency> | ||
| <groupId>org.springframework.ai</groupId> | ||
| <artifactId>spring-ai-autoconfigure-mcp-client-common</artifactId> |
There was a problem hiding this comment.
You mention adding those dependencies but you didn't add them to the spring app, are they really needed?
Context
AI/ai-sdk-java-backlog#404.
Updated Spring AI glue to version 2.0.1
Documentation pr - SAP/ai-sdk#687
E2E test run - https://github.com/SAP/ai-sdk-java/actions/runs/33862437258
Definition of Done
(Optional) Aligned changes with the JS SDK(no spring ai for JS SDK)