Skip to content

feat(langchain4j): implement model provider strategies with capabilit… - #37048

Draft
KevinDavilaDotCMS wants to merge 1 commit into
mainfrom
36826-dotai-provider-configuration-ui
Draft

feat(langchain4j): implement model provider strategies with capabilit…#37048
KevinDavilaDotCMS wants to merge 1 commit into
mainfrom
36826-dotai-provider-configuration-ui

Conversation

@KevinDavilaDotCMS

Copy link
Copy Markdown
Member
  • Added new model provider strategies for various AI services (Anthropic, Azure OpenAI, Bedrock, Google AI, OpenAI, OpenRouter, Vertex AI).
  • Introduced enum to define supported capabilities (CHAT, EMBEDDINGS, IMAGE).
  • Implemented and to manage configuration fields for each provider.
  • Created to aggregate provider capabilities and fields for dynamic form rendering.
  • Added REST endpoint to expose provider metadata for client consumption.
  • Updated OpenAPI documentation to reflect new endpoints and data structures.
  • Added unit tests for provider metadata functionality.

This commit enhances the AI provider configuration system, allowing for more flexible and dynamic integration of various AI models.

Proposed Changes

  • change 1
  • change 2

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)

Additional Info

** any additional useful context or info **

Screenshots

Original Updated
** original screenshot ** ** updated screenshot **

…y and configuration metadata

- Added new model provider strategies for various AI services (Anthropic, Azure OpenAI, Bedrock, Google AI, OpenAI, OpenRouter, Vertex AI).
- Introduced  enum to define supported capabilities (CHAT, EMBEDDINGS, IMAGE).
- Implemented  and  to manage configuration fields for each provider.
- Created  to aggregate provider capabilities and fields for dynamic form rendering.
- Added REST endpoint  to expose provider metadata for client consumption.
- Updated OpenAPI documentation to reflect new endpoints and data structures.
- Added unit tests for provider metadata functionality.

This commit enhances the AI provider configuration system, allowing for more flexible and dynamic integration of various AI models.
@KevinDavilaDotCMS KevinDavilaDotCMS linked an issue Aug 13, 2026 that may be closed by this pull request
13 tasks
@github-actions github-actions Bot mentioned this pull request Aug 13, 2026
13 tasks
@github-actions github-actions Bot added Area : Backend PR changes Java/Maven backend code Area : Frontend PR changes Angular/TypeScript frontend code labels Aug 13, 2026
@claude

claude Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Claude finished @KevinDavilaDotCMS's task in 2m 32s —— View job


Claude Code Review

  • Read changed files
  • Analyze for bugs, security, conventions
  • Post review

I reviewed the full diff against origin/main. This is a clean, well-documented addition. The metadata model, factory aggregation, and REST endpoint all follow dotCMS conventions. Verified specifics:

  • Every declared field name (apiKey, model, endpoint, deploymentName, apiVersion, dimensions, size, region, accessKeyId, secretAccessKey, embeddingInputType, projectId, location, credentialsJson, maxRetries, timeout, temperature, maxTokens) matches an actual accessor on ProviderConfig, so the metadata contract is accurate.
  • Credential fields are correctly typed SECRET, and @Value.Redacted fields line up with them.
  • supportedCapabilities() and the configFields() switch are aligned for all 7 providers, so toMetadata() never triggers an UnsupportedOperationException at runtime; test_listProviderMetadata_fieldsKeyedOnlyBySupportedCapabilities guards this against future drift.
  • AiProviderResource is auto-registered via the com.dotcms.ai.rest package scan in DotRestApplication, and @Path("/") on the method matches the sibling EmbeddingsResource convention.
  • requiredBackendUser(true) is the right guard — the payload is static, non-sensitive metadata (field names only, no values).
  • openapi.yaml reflects the new endpoint/schemas and appears generated (path /v1/ai/providers, correct $refs).

New Issues

  • 🟡 Medium: dotCMS/src/test/java/com/dotcms/ai/client/langchain4j/ProviderMetadataTest.java — The class javadoc correctly notes the declarative metadata "restates knowledge already enforced imperatively" with nothing keeping them in sync, and assertMissingRequiredFieldBreaksChatBuild cross-checks required fields — but only for CHAT. Required-field declarations for EMBEDDINGS and IMAGE (e.g. Azure/Bedrock/Google embeddings apiKey/endpoint/region) are never cross-checked against actual build validation, so those can silently drift. Non-blocking; the shared required fields overlap CHAT, but a dedicated embeddings/image check would close the gap. Fix this →
  • 🟡 Medium: dotCMS/src/main/java/com/dotcms/ai/client/langchain4j/ProviderField.java:19 / ProviderMetadata.java:26 — The compact-constructor validation (blank name, null type, null provider) has no test coverage. Cheap to add and locks in the invariant these records advertise.

No blocking issues found.

· 36826-dotai-provider-configuration-ui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area : Backend PR changes Java/Maven backend code Area : Frontend PR changes Angular/TypeScript frontend code

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

dotAI: Provider Configuration UI

2 participants