Problem Statement
dotCMS's LangChain4J integration (Phase 1) supports only standalone OpenAI. Enterprise customers whose compliance frameworks require AI services hosted within Azure infrastructure — for data residency, contractual privacy guarantees, or corporate policy — cannot configure dotAI to route through their Azure OpenAI deployments without code changes.
Solution
Add Azure OpenAI as a supported provider in LangChain4jModelFactory. The azure_openai case maps deployment-based configuration (deploymentName, endpoint, apiVersion) to the LangChain4J Azure OpenAI builders for chat, embeddings, and image generation. No changes required outside the factory class. Only a providerConfig JSON update is needed to switch from OpenAI to Azure.
{
"chat": {
"provider": "azure_openai",
"apiKey": "...",
"endpoint": "https://my-company.openai.azure.com/",
"deploymentName": "gpt-4o",
"apiVersion": "2024-02-01",
"maxTokens": 16384,
"temperature": 1.0
},
"embeddings": {
"provider": "azure_openai",
"apiKey": "...",
"endpoint": "https://my-company.openai.azure.com/",
"deploymentName": "text-embedding-ada-002",
"apiVersion": "2024-02-01"
},
"image": {
"provider": "azure_openai",
"apiKey": "...",
"endpoint": "https://my-company.openai.azure.com/",
"deploymentName": "dall-e-3",
"apiVersion": "2024-02-01"
}
}
Acceptance Criteria
dotCMS Version
main
Links
Problem Statement
dotCMS's LangChain4J integration (Phase 1) supports only standalone OpenAI. Enterprise customers whose compliance frameworks require AI services hosted within Azure infrastructure — for data residency, contractual privacy guarantees, or corporate policy — cannot configure dotAI to route through their Azure OpenAI deployments without code changes.
Solution
Add Azure OpenAI as a supported provider in
LangChain4jModelFactory. Theazure_openaicase maps deployment-based configuration (deploymentName,endpoint,apiVersion) to the LangChain4J Azure OpenAI builders for chat, embeddings, and image generation. No changes required outside the factory class. Only aproviderConfigJSON update is needed to switch from OpenAI to Azure.{ "chat": { "provider": "azure_openai", "apiKey": "...", "endpoint": "https://my-company.openai.azure.com/", "deploymentName": "gpt-4o", "apiVersion": "2024-02-01", "maxTokens": 16384, "temperature": 1.0 }, "embeddings": { "provider": "azure_openai", "apiKey": "...", "endpoint": "https://my-company.openai.azure.com/", "deploymentName": "text-embedding-ada-002", "apiVersion": "2024-02-01" }, "image": { "provider": "azure_openai", "apiKey": "...", "endpoint": "https://my-company.openai.azure.com/", "deploymentName": "dall-e-3", "apiVersion": "2024-02-01" } }Acceptance Criteria
provider: "azure_openai"inproviderConfig.deploymentName,endpoint, andapiVersionare correctly passed to the LangChain4J Azure builders.deploymentNamefalls back tomodelif not explicitly set.langchain4j-azure-open-aidependency is added; Netty and Reactor versions are pinned in BOM to resolve transitive conflicts introduced by the Azure SDK.LangChain4jModelFactoryTest.dotCMS Version
main
Links