Problem Statement
dotCMS's LangChain4J integration can reach Anthropic Claude models only through AWS Bedrock, which requires AWS infrastructure, IAM credentials and region configuration. Customers with a direct Anthropic account who want Claude via the Anthropic Messages API — a simple API key, no AWS dependency — have no way to configure dotAI for it without code changes.
Solution
Add Anthropic as a supported provider in LangChain4jModelFactory under the identifier anthropic. Talks directly to the Anthropic Messages API with an API key. Supports chat (streaming and non-streaming); Anthropic offers no embeddings or image-generation APIs, so those throw UnsupportedOperationException. The endpoint field optionally overrides the default base URL (proxies/gateways).
{
"chat": {
"provider": "anthropic",
"model": "claude-sonnet-4-6",
"apiKey": "sk-ant-...",
"maxTokens": 4096,
"temperature": 0.7
}
}
Acceptance Criteria
dotCMS Version
main
Links
Problem Statement
dotCMS's LangChain4J integration can reach Anthropic Claude models only through AWS Bedrock, which requires AWS infrastructure, IAM credentials and region configuration. Customers with a direct Anthropic account who want Claude via the Anthropic Messages API — a simple API key, no AWS dependency — have no way to configure dotAI for it without code changes.
Solution
Add Anthropic as a supported provider in
LangChain4jModelFactoryunder the identifieranthropic. Talks directly to the Anthropic Messages API with an API key. Supports chat (streaming and non-streaming); Anthropic offers no embeddings or image-generation APIs, so those throwUnsupportedOperationException. Theendpointfield optionally overrides the default base URL (proxies/gateways).{ "chat": { "provider": "anthropic", "model": "claude-sonnet-4-6", "apiKey": "sk-ant-...", "maxTokens": 4096, "temperature": 0.7 } }Acceptance Criteria
provider: "anthropic"inproviderConfig.endpointoverrides the default base URL when set (proxies/gateways).provider: "anthropic"throws a clearUnsupportedOperationException.LangChain4jModelFactoryTest.dotCMS Version
main
Links