Skip to content

[TASK] dotAI: LangChain4J - Azure OpenAI provider #35484

@fmontes

Description

@fmontes

Description

Add Azure OpenAI as a supported provider in the dotAI LangChain4J integration layer (Phase 2 of multi-provider support). Enterprise customers using Azure-hosted OpenAI deployments need to configure dotAI without code changes — only a providerConfig JSON update should be required.

This builds on the LangChain4J abstraction established in #35183 (Phase 1 — OpenAI).

Implementation outline:

  • Add langchain4j-azure-open-ai dependency
  • Add azure_openai case to LangChain4jModelFactory switch
  • Implement buildAzureOpenAiChatModel, buildAzureOpenAiEmbeddingModel, buildAzureOpenAiImageModel
  • Pin Netty (4.1.118.Final) and Reactor (3.4.41) in BOM to resolve transitive version conflicts introduced by the Azure SDK

Acceptance Criteria

  • azure_openai is selectable as a provider in providerConfig for chat, embeddings, and image sections
  • deploymentName is required for Azure (falls back to model if not set)
  • apiVersion maps to Azure's serviceVersion (recommended: 2024-02-01)
  • Netty/Reactor version pins do not affect existing OpenAI behavior
  • Unit tests cover Azure chat, embedding, and image model builders in LangChain4jModelFactoryTest
  • No breaking changes to existing OpenAI configuration

Additional Context

Sample configuration:

{
  "chat": {
    "provider": "azure_openai",
    "apiKey": "...",
    "endpoint": "https://my-company.openai.azure.com/",
    "deploymentName": "gpt-4o",
    "apiVersion": "2024-02-01",
    "maxTokens": 16384,
    "temperature": 1.0
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions