Problem/Motivation
Drupal AI provides a “Chat with Structured Response” configuration for AI operations that require structured output. However, modules that generate structured content may need a dedicated model configuration without changing the model used by other modules.
A reusable “Structured Content Generation” configuration could allow modules to use a separately configured provider and model for structured content generation.
Steps to reproduce
- Configure a provider and model under “Chat with Structured Response” in Drupal AI settings.
- Use this configuration in a module that generates structured content.
- Change the configured model to meet that module's requirements.
- Other modules using the same configuration may also be affected by the change.
Proposed resolution
Introduce a dedicated “Structured Content Generation” configuration in Drupal AI settings.
- Allow administrators to select an AI provider and model for this configuration.
- Make the configuration available through a reusable API or integration mechanism for contributed modules.
- Keep it independent of the existing “Chat with Structured Response” configuration.
- Reuse existing Drupal AI provider and credential management.
- Provide appropriate validation and tests.
Remaining tasks
- Confirm the proposed configuration approach with Drupal AI maintainers.
- Implement the configuration and integration mechanism.
- Add automated tests and documentation.
- Verify compatibility with existing AI configurations.
User interface changes
Add a “Structured Content Generation” configuration to Drupal AI settings, including provider and model selection.
API changes
Provide a reusable mechanism for modules to access the configured provider and model for structured content generation.
Data model changes
Store the provider and model selection in Drupal configuration, following existing Drupal AI configuration conventions.
Issue fork content_studio-3634034
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments