Problem Statement
dotCMS's LangChain4J integration (Phase 1) supports only standalone OpenAI. Enterprise customers using AWS infrastructure need to route AI workloads through AWS Bedrock, which provides managed access to multiple model families (Anthropic Claude, Amazon Titan, Cohere, Meta) under AWS's data privacy and compliance guarantees. There is currently no way to configure dotAI to use Bedrock without code changes.
Solution
Add AWS Bedrock as a supported provider in LangChain4jModelFactory. Supports both explicit credentials (accessKeyId, secretAccessKey) and IAM role via DefaultCredentialsProvider. Implements chat and embeddings; image generation is not available through LangChain4J for Bedrock and throws UnsupportedOperationException. A single integration covers all Bedrock-proxied model families via the Converse API.
{
"chat": {
"provider": "bedrock",
"region": "us-east-1",
"accessKeyId": "...",
"secretAccessKey": "...",
"model": "anthropic.claude-3-5-sonnet-20241022-v2:0",
"maxTokens": 16384,
"temperature": 1.0
},
"embeddings": {
"provider": "bedrock",
"region": "us-east-1",
"accessKeyId": "...",
"secretAccessKey": "...",
"model": "amazon.titan-embed-text-v2:0"
}
}
Acceptance Criteria
dotCMS Version
main
Links
Problem Statement
dotCMS's LangChain4J integration (Phase 1) supports only standalone OpenAI. Enterprise customers using AWS infrastructure need to route AI workloads through AWS Bedrock, which provides managed access to multiple model families (Anthropic Claude, Amazon Titan, Cohere, Meta) under AWS's data privacy and compliance guarantees. There is currently no way to configure dotAI to use Bedrock without code changes.
Solution
Add AWS Bedrock as a supported provider in
LangChain4jModelFactory. Supports both explicit credentials (accessKeyId,secretAccessKey) and IAM role viaDefaultCredentialsProvider. Implements chat and embeddings; image generation is not available through LangChain4J for Bedrock and throwsUnsupportedOperationException. A single integration covers all Bedrock-proxied model families via the Converse API.{ "chat": { "provider": "bedrock", "region": "us-east-1", "accessKeyId": "...", "secretAccessKey": "...", "model": "anthropic.claude-3-5-sonnet-20241022-v2:0", "maxTokens": 16384, "temperature": 1.0 }, "embeddings": { "provider": "bedrock", "region": "us-east-1", "accessKeyId": "...", "secretAccessKey": "...", "model": "amazon.titan-embed-text-v2:0" } }Acceptance Criteria
provider: "bedrock"inproviderConfig.accessKeyId,secretAccessKey) and IAM role (credentials omitted, resolved viaDefaultCredentialsProvider) both authenticate successfully.cohere.useBedrockCohereEmbeddingModel; all others useBedrockTitanEmbeddingModel.embeddingInputTypefield is supported for Cohere embeddings (search_document/search_query); ignored for Titan.provider: "bedrock"throws a clearUnsupportedOperationException.LangChain4jModelFactoryTest.dotCMS Version
main
Links