Problem Statement
The dotAI LangChain4J integration was pinned to version 1.0.0. Two issues stemmed from this:
-
Azure image generation broken: Azure deprecated dall-e-3 in June 2025. The existing AzureOpenAiImageModel only supported dall-e-3, leaving Azure customers with no working image generation model.
-
Outdated dependency: LangChain4j 1.15.1 (released 2026-05-28) includes significant improvements, bug fixes, and API updates over 1.0.0.
Solution
-
Bump langchain4j.version from 1.0.0 to 1.15.1 in bom/application/pom.xml.
-
Add langchain4j-open-ai-official dependency to dotCMS/pom.xml. This module provides OpenAiOfficialImageModel, which supports Azure via Microsoft Foundry (isMicrosoftFoundry(true)) and enables gpt-image-1 image generation on Azure.
-
Update AzureOpenAiModelProviderStrategy.buildImageModel() to use OpenAiOfficialImageModel instead of the deprecated AzureOpenAiImageModel.
-
Fix VertexAiModelProviderStrategy imports: the Vertex AI Gemini classes moved from dev.langchain4j.model.vertexai to dev.langchain4j.model.vertexai.gemini in 1.15.1.
Sample Configuration
{
"image": {
"provider": "azure_openai",
"apiKey": "...",
"endpoint": "https://<resource>.openai.azure.com/",
"deploymentName": "gpt-image-1",
"apiVersion": "2025-04-01-preview",
"size": "1024x1024"
}
}
Acceptance Criteria
dotCMS Version
main
Links
Problem Statement
The dotAI LangChain4J integration was pinned to version 1.0.0. Two issues stemmed from this:
Azure image generation broken: Azure deprecated
dall-e-3in June 2025. The existingAzureOpenAiImageModelonly supporteddall-e-3, leaving Azure customers with no working image generation model.Outdated dependency: LangChain4j 1.15.1 (released 2026-05-28) includes significant improvements, bug fixes, and API updates over 1.0.0.
Solution
Bump
langchain4j.versionfrom1.0.0to1.15.1inbom/application/pom.xml.Add
langchain4j-open-ai-officialdependency todotCMS/pom.xml. This module providesOpenAiOfficialImageModel, which supports Azure via Microsoft Foundry (isMicrosoftFoundry(true)) and enablesgpt-image-1image generation on Azure.Update
AzureOpenAiModelProviderStrategy.buildImageModel()to useOpenAiOfficialImageModelinstead of the deprecatedAzureOpenAiImageModel.Fix
VertexAiModelProviderStrategyimports: the Vertex AI Gemini classes moved fromdev.langchain4j.model.vertexaitodev.langchain4j.model.vertexai.geminiin 1.15.1.Sample Configuration
{ "image": { "provider": "azure_openai", "apiKey": "...", "endpoint": "https://<resource>.openai.azure.com/", "deploymentName": "gpt-image-1", "apiVersion": "2025-04-01-preview", "size": "1024x1024" } }Acceptance Criteria
langchain4j.versionis1.15.1inbom/application/pom.xml.gpt-image-1.dotCMS Version
main
Links