Problem Statement
dotCMS's LangChain4J integration (Phase 1) supports only standalone OpenAI. Enterprise customers on GCP need to route AI workloads through Vertex AI (Gemini), which provides managed model access under Google's data residency and compliance agreements. Vertex AI uses Application Default Credentials — no API key is required or accepted — making it incompatible with the existing OpenAI-centric configuration model.
Solution
Add Google Vertex AI as a supported chat provider in LangChain4jModelFactory. Authentication is handled automatically via Application Default Credentials (ADC): service account attached to the instance, gcloud auth application-default login, or Workload Identity. No API key needed. Embeddings and image generation are not available through LangChain4J for Vertex AI and throw UnsupportedOperationException.
{
"chat": {
"provider": "vertex_ai",
"projectId": "my-gcp-project",
"location": "us-central1",
"model": "gemini-1.5-pro",
"maxTokens": 8192,
"temperature": 1.0
}
}
Acceptance Criteria
dotCMS Version
main
Links
Problem Statement
dotCMS's LangChain4J integration (Phase 1) supports only standalone OpenAI. Enterprise customers on GCP need to route AI workloads through Vertex AI (Gemini), which provides managed model access under Google's data residency and compliance agreements. Vertex AI uses Application Default Credentials — no API key is required or accepted — making it incompatible with the existing OpenAI-centric configuration model.
Solution
Add Google Vertex AI as a supported chat provider in
LangChain4jModelFactory. Authentication is handled automatically via Application Default Credentials (ADC): service account attached to the instance,gcloud auth application-default login, or Workload Identity. No API key needed. Embeddings and image generation are not available through LangChain4J for Vertex AI and throwUnsupportedOperationException.{ "chat": { "provider": "vertex_ai", "projectId": "my-gcp-project", "location": "us-central1", "model": "gemini-1.5-pro", "maxTokens": 8192, "temperature": 1.0 } }Acceptance Criteria
provider: "vertex_ai"inproviderConfig.projectId,location, andmodelare correctly passed toVertexAiGeminiChatModel.provider: "vertex_ai"throws a clearUnsupportedOperationException.org.checkerframework:checker-qual,com.google.android:annotations) are explicitly excluded from thelangchain4j-vertex-ai-geminiMaven dependency.LangChain4jModelFactoryTest.dotCMS Version
main
Links