Feature request
The current openai-java SDK depends on Jackson 2.x (com.fasterxml.jackson.*). The README's Jackson section says the SDK is compatible with Jackson 2.13.4 or higher and depends on 2.18.2 by default, and openai-java-core/build.gradle.kts still declares Jackson 2 dependencies.
Spring Boot 4 / Spring Framework 7 applications use Jackson 3 in the HTTP JSON layer (tools.jackson.*). Jackson 3 also changed Maven coordinates and Java packages, so this is not just a dependency-version override.
That creates integration friction when SDK-generated models or Jackson 2 types, especially com.fasterxml.jackson.databind.JsonNode, are returned from controllers or included in application DTOs. In a Spring Boot 4 app, the HTTP layer is using Jackson 3, while the SDK and some SDK-facing code still expose Jackson 2 JSON types. Depending on the shape, Jackson 3 can treat a Jackson 2 JsonNode as a regular Java object instead of a JSON tree unless the application adds bridge serialization code or maps to its own DTOs.
This is not a critical issue when the SDK is used entirely internally, but it becomes more visible for apps that expose REST APIs, compose DTOs around SDK data, or migrate existing Spring Boot services to Boot 4.
Would the project consider one of these paths?
- a Jackson 3-compatible variant/module, for example
openai-java-jackson3
- a Spring Boot 4-friendly starter/module
- a Jackson-neutral public model or raw JSON surface, for example
String, Map, or an SDK-owned lightweight JSON type where appropriate
- documentation advising Spring Boot 4 users not to return SDK models or Jackson 2 JSON nodes directly from controllers
- a published migration plan for Jackson 3 compatibility, even if the default SDK remains on Jackson 2 for compatibility
Environment
openai-java: observed locally with 4.33.0; current latest release checked: 4.36.0
- Spring Boot:
4.0.0
- Java:
21
- Application HTTP JSON layer: Jackson 3 (
tools.jackson.*)
- SDK JSON dependencies/types: Jackson 2 (
com.fasterxml.jackson.*)
Current workaround
Map SDK objects to application-owned DTOs before returning them from controllers. Where a Jackson 2 JsonNode must cross a Spring Boot 4 HTTP boundary, register a Jackson 3 serializer/module that writes the Jackson 2 tree explicitly.
I understand that moving the whole SDK to Jackson 3 could be a breaking change for Java 8, Android, and existing Spring Boot / Jackson 2 users. This issue is intended as a compatibility-path / documentation request rather than a bug report.
Related references:
Feature request
The current
openai-javaSDK depends on Jackson 2.x (com.fasterxml.jackson.*). The README's Jackson section says the SDK is compatible with Jackson2.13.4or higher and depends on2.18.2by default, andopenai-java-core/build.gradle.ktsstill declares Jackson 2 dependencies.Spring Boot 4 / Spring Framework 7 applications use Jackson 3 in the HTTP JSON layer (
tools.jackson.*). Jackson 3 also changed Maven coordinates and Java packages, so this is not just a dependency-version override.That creates integration friction when SDK-generated models or Jackson 2 types, especially
com.fasterxml.jackson.databind.JsonNode, are returned from controllers or included in application DTOs. In a Spring Boot 4 app, the HTTP layer is using Jackson 3, while the SDK and some SDK-facing code still expose Jackson 2 JSON types. Depending on the shape, Jackson 3 can treat a Jackson 2JsonNodeas a regular Java object instead of a JSON tree unless the application adds bridge serialization code or maps to its own DTOs.This is not a critical issue when the SDK is used entirely internally, but it becomes more visible for apps that expose REST APIs, compose DTOs around SDK data, or migrate existing Spring Boot services to Boot 4.
Would the project consider one of these paths?
openai-java-jackson3String,Map, or an SDK-owned lightweight JSON type where appropriateEnvironment
openai-java: observed locally with4.33.0; current latest release checked:4.36.04.0.021tools.jackson.*)com.fasterxml.jackson.*)Current workaround
Map SDK objects to application-owned DTOs before returning them from controllers. Where a Jackson 2
JsonNodemust cross a Spring Boot 4 HTTP boundary, register a Jackson 3 serializer/module that writes the Jackson 2 tree explicitly.I understand that moving the whole SDK to Jackson 3 could be a breaking change for Java 8, Android, and existing Spring Boot / Jackson 2 users. This issue is intended as a compatibility-path / documentation request rather than a bug report.
Related references: