Skip to content

feat(dotAI): Implement new dotAI config page - #37048

Open
KevinDavilaDotCMS wants to merge 7 commits into
mainfrom
36826-dotai-provider-configuration-ui
Open

feat(dotAI): Implement new dotAI config page#37048
KevinDavilaDotCMS wants to merge 7 commits into
mainfrom
36826-dotai-provider-configuration-ui

Conversation

@KevinDavilaDotCMS

@KevinDavilaDotCMS KevinDavilaDotCMS commented Aug 13, 2026

Copy link
Copy Markdown
Member
0817.mov
  • 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 4m 23s —— View job


Code Review

Reviewed the backend (REST resource, provider strategies, connection tester, masked-credential guard) and frontend (config detail, capability/settings cards, dynamic fields, service). This is a solid, well-tested PR — the masked-credential exfiltration/SSRF guard in AiProviderResource is thoughtfully designed and has good regression coverage in AiProviderResourceTest. A few non-blocking items below.

New Issues

  • 🟡 Medium: dotCMS/src/main/java/com/dotcms/ai/client/langchain4j/AzureOpenAiModelProviderStrategy.java:37-38 / core-web/.../dot-ai-capability-card.component.ts:305-311 — Azure's model and deploymentName are both optional in the metadata (either-or), so the frontend applies no Validators.required to either and isValid() passes with both empty. CompletionsResource.saveConfig only merges + persists (it never calls the strategy's validate()), so an Azure config with neither field can be saved silently and will only blow up later at model-build time (AzureOpenAiModelProviderStrategy.validate throws). Consider surfacing the either-or requirement client-side (or validating on save) so users don't persist an unusable config. Fix this →

  • 🟡 Medium: dotCMS/src/main/java/com/dotcms/ai/client/langchain4j/ProviderConnectionTester.java:63-80 — the test issues a synchronous outbound call on the JAX-RS worker thread. Failures are caught, but there's no upper bound enforced by dotCMS on how long the call blocks when the posted config omits timeout. Assumption: it relies on each provider SDK's default timeout. What to verify: that an unreachable/hanging endpoint can't tie up a request thread indefinitely (admin-only, so low blast radius, but worth confirming the SDK defaults are finite for every provider). Consider applying a conservative default timeout for the test path when none is supplied.

Notes

  • The Semgrep detect-langchain comment on ProviderConnectionTester.java:79 is a false positive for this PR — the file lives in the existing langchain4j package that's already the approved integration point, and the prompt is a fixed constant, not user input.
  • openapi.yaml was regenerated and committed alongside the annotations — good, matches the repo's auto-gen rule.
  • No System.out/System.getProperty usage; all logging via Logger; no hardcoded secrets. Conventions look good.

No blocking issues found.
· 36826-dotai-provider-configuration-ui

…forms and additional properties

- Refactored the AI configuration detail component to improve layout and user experience.
- Introduced new components for capability cards, settings, and dynamic fields to support various AI provider configurations.
- Added functionality for managing additional properties in a flexible key/value format.
- Implemented loading states and error handling for better user feedback during configuration.
- Created constants for capability metadata and settings fields to streamline configuration management.

This commit significantly enhances the AI provider configuration interface, allowing for more intuitive and dynamic interactions.
@KevinDavilaDotCMS KevinDavilaDotCMS changed the title feat(langchain4j): implement model provider strategies with capabilit… feat(dotAI): Implement new dotAI config page Aug 17, 2026
…ocalization and error handling

- Refactored the AI configuration detail component to utilize new localization keys for titles, subtitles, and button labels.
- Enhanced error handling by integrating localized error messages for loading and saving configurations.
- Updated constants for capability metadata and settings fields to support dynamic localization.
- Improved user feedback with loading indicators and unsaved changes notifications using localized strings.
- Added new localization keys to the Language.properties file to support the changes.

This commit enhances the user experience by providing a more localized and informative interface for AI configuration management.
…ucture

- Cleaned up import statements in the AI configuration detail component and its subcomponents for better readability and organization.
- Moved the  import to the appropriate location in the  file.
- Adjusted the import order in  and  to maintain consistency and improve clarity.

These changes streamline the code structure, making it easier to navigate and maintain.
…entials

- Added checks to ensure only CMS admins can test AI provider connections, enhancing security.
- Updated OpenAPI documentation to reflect the new requirement for admin access.
- Implemented a method to validate that masked credentials are only resolved when the posted provider and endpoint match the stored configuration, preventing potential credential exfiltration.
- Introduced unit tests to cover various scenarios for masked credential resolution, ensuring robust functionality and security.

These changes improve the security posture of the AI provider resource and ensure that sensitive information is handled appropriately.
@KevinDavilaDotCMS
KevinDavilaDotCMS marked this pull request as ready for review August 18, 2026 15:02
@zJaaal zJaaal added the PR: docker image Build & push a per-PR test image to dotcms/dotcms-test label Aug 18, 2026
@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🐳 PR Docker test image

Latest build for commit f5b5f49 pushed to dotcms/dotcms-test:

docker pull dotcms/dotcms-test:pr-37048-36826-dotai-provider-configuration-ui
docker pull dotcms/dotcms-test:pr-37048-36826-dotai-provider-configuration-ui_f5b5f49

… AI configuration fields

- Introduced unit tests for the  function to validate field visibility rules based on requirements and types.
- Refactored the AI capability card component to utilize the new visibility logic, ensuring required and specific optional fields are displayed above the Advanced panel.
- Updated the HTML templates to reflect changes in field visibility, enhancing user experience by clearly distinguishing between visible and advanced fields.
- Improved the organization of the AI configuration detail component for better maintainability.

These changes enhance the functionality and reliability of the AI configuration interface, ensuring that users have a clearer understanding of which fields are essential and which are optional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Safe To Rollback Area : Backend PR changes Java/Maven backend code Area : Frontend PR changes Angular/TypeScript frontend code PR: docker image Build & push a per-PR test image to dotcms/dotcms-test

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

dotAI: Provider Configuration UI

3 participants