Replace Spring AI 2.0 deprecated API - #1840
Conversation
guanxuc
commented
Jul 30, 2026
- Rename ChatModel.getDefaultOptions() to getOptions()
- Rename ChatClientCustomizer to ChatClientBuilderCustomizer
- Replace ChatClient.toolCallbacks() to tools()
- Convert OpenAiEmbeddingModel from constructor to builder pattern
- Update related comments and documentation to reflect new API names
f22027b to
dab96ac
Compare
|
@guanxuc - good call. requires coordination with PR #1837 and PR #1826. Also requires testing of all IT tests in embabel-agent and embabel-agent-experimental repo. @arnabnandy7 - FYI |
Let me analyse and share the impact statement for #1826 |
- Rename ChatModel.getDefaultOptions() to getOptions() - Rename ChatClientCustomizer to ChatClientBuilderCustomizer - Replace ChatClient.toolCallbacks() to tools() - Convert OpenAiEmbeddingModel from constructor to builder pattern - Update related comments and documentation to reflect new API names Signed-off-by: guanxu <1510424541@qq.com>
|
For #1836 the main integration risk is that |
|
This PR overlaps with the streaming changes in #1826, primarily around the Spring AI The provider-neutral streaming tool-loop design is unaffected. During conflict resolution, we will retain the The LangChain4j/Ollama unfolding integration test is unaffected. @igordayen |
|
@guanxuc, @arnabnandy7 - please confirm the preferred order of merges. |
That's one option but if/when he starts it back he has to carefully rebase and refactor to incorporate the changes we'll be merging into main. Ofcourse it's only if this issue is being actively looked into later on. |
|
My plan to execute tests later in day, thanks |
|
requires attention: Did you run unit tests? @guanxuc - that is even prior to IT tests. |
|
@guanxuc @arnabnandy7 - successfully passed all integration tests. |
Thanks for the feedback! Apologies for overlooking this. I've applied the fix and all tests are now passing. |
|
Test passed! |
|
Builder pattern for OpenAiEmbeddingModel:
Easy misses to watch for:
@guanxuc - could you review and see that everything got spotted cleanly? Thank you Did you capture all deprecated warnings from logs related to the upgrade? thx |
|
@igordayen Thanks for the detailed checklist! I've gone through all the mentioned areas (XML configs, Spring beans, tests, and docs) and confirmed that everything has been properly migrated. No stale references found. |
Hi @igordayen , I noticed that the GitHub CI workflow is currently located at |
|
Nice work, thank you, @guanxuc |
@alexheifetz FYI |