GH-6602: Align OkHttp dependency on okhttp-jvm 5.3.2 - #6735
Open
Yobil-Job wants to merge 1 commit into
Open
Conversation
Signed-off-by: Eyob Weldetensay <eyobwldetensay@gmail.com>
Yobil-Job
force-pushed
the
6602-align-okhttp-5
branch
from
August 4, 2026 23:45
a1a5285 to
239b40c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6602
Problem
Spring AI currently depends on
com.squareup.okhttp3:okhttp:4.12.0.With Spring Boot 4's OpenTelemetry starter, applications can receive
com.squareup.okhttp3:okhttp-jvm:5.3.2. Since Maven treatsokhttpandokhttp-jvmas different artifacts, both JARs can exist on the classpath and introduce duplicateokhttp3.*classes.Additionally, using
okhttp:5.xdirectly would not solve this because the OkHttp 5 root artifact is only a Kotlin Multiplatform metadata artifact; the JVM implementation is published asokhttp-jvm.Solution
Aligned Spring AI's OkHttp dependency usage with the OkHttp 5 JVM artifact:
okhttp3.versionfrom4.12.0to5.3.2spring-ai-openaifromokhttptookhttp-jvmspring-ai-anthropicfromokhttptookhttp-jvmokhttp-jvmokhttp:4.xdependency fromtypesense-javato prevent duplicate classesVerification
Confirmed Maven dependency resolution contains only:
com.squareup.okhttp3:okhttp-jvm:5.3.2
Verified affected modules:
spring-ai-openaispring-ai-anthropicspring-ai-typesense-storespring-ai-testAll tests passed.
No Java source changes were required.