You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds Anthropic as a supported provider, talking directly to the Anthropic Messages
API with an API key — distinct from accessing Claude models through AWS Bedrock,
which requires AWS infrastructure and IAM credentials.
Add langchain4j-anthropic dependency (version via langchain4j BOM)
Add AnthropicModelProviderStrategy registered in LangChain4jModelFactory.STRATEGIES
Chat + streaming chat via AnthropicChatModel / AnthropicStreamingChatModel
Embeddings and image throw UnsupportedOperationException (Anthropic has no such APIs)
endpoint config field overrides the default base URL (proxies/gateways)
This PR adds only: a new Maven dependency (langchain4j-anthropic), a new package-private Java class implementing an existing internal interface, Javadoc updates, and unit tests. Rolling back to N-1 simply removes the Anthropic provider — no data, mappings, or external contracts are affected.
**[> [🟡 Medium]dotCMS/pom.xml:517 — New dependency is added directly to dotCMS/pom.xml without a corresponding change in bom/application/pom.xml. dotCMS convention requires dependency version management to be added in bom/application/pom.xml only; if this artifact is not already managed, Maven builds will fail or dependency resolution will be inconsistent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Anthropic as a supported provider, talking directly to the Anthropic Messages
API with an API key — distinct from accessing Claude models through AWS Bedrock,
which requires AWS infrastructure and IAM credentials.
langchain4j-anthropicdependency (version via langchain4j BOM)AnthropicModelProviderStrategyregistered inLangChain4jModelFactory.STRATEGIESAnthropicChatModel/AnthropicStreamingChatModelUnsupportedOperationException(Anthropic has no such APIs)endpointconfig field overrides the default base URL (proxies/gateways)LangChain4jModelFactoryTestConfiguration
{ "chat": { "provider": "anthropic", "model": "claude-sonnet-4-6", "apiKey": "sk-ant-...", "maxTokens": 4096, "temperature": 0.7 } }Notes
claude-sonnet-4-6,claude-opus-4-8,claude-haiku-4-5.maxRetriesis not supported by the streaming chat model and is ignored with a warning (same behavior as the OpenAI provider).Related Issue
This PR fixes #36135
EPIC: dotAI Multi-Provider Support #33970