Drupal is a registered trademark of Dries Buytaert
cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! linkit 7.0.15 Minor update available for module linkit (7.0.15). views_data_export 8.x-1.10 Minor update available for module views_data_export (8.x-1.10).

A Drupal recipe for Thunder that adds an AI-powered content suggestion button to any node field widget.

Requires the Thunder AI recipe to be applied first.

What this recipe installs

Module Description drupal/field_widget_actions Adds action buttons to field widgets drupal/ai_content_suggestions AI-powered content suggestions in the editor

Requirements

  • Thunder distribution
  • Composer
  • Thunder AI recipe applied

Installation

Apply the recipe using Drupal's recipe system:

drush recipe ../recipes/thunder_ai_content_suggestions

The recipe asks the following questions:

  1. Content type — machine name of the content type whose edit form gets the button (e.g. article, page)
  2. Field machine name — the field on that content type to attach the button to (e.g. title, field_seo_title)
  3. AI suggestion prompt — the prompt sent to the AI provider; defaults to Based on the content, suggest 3 concise and compelling titles. — adjust to match the target field (e.g. a summary or SEO description prompt)
  4. View mode — how the entity is rendered and appended to the prompt when no entity tokens are used; defaults to full

To skip the prompts entirely, pass all values as flags:


drush recipe ../recipes/thunder_ai_content_suggestions \ --input="thunder_ai_content_suggestions.content_type=article" \ --input="thunder_ai_content_suggestions.field_name=title" \ --input="thunder_ai_content_suggestions.prompt=Based on the content, suggest 3 concise and compelling titles." \ --input="thunder_ai_content_suggestions.view_mode=full"

What the recipe configures

Adds a Suggest content button to the chosen field on the chosen content type's default node form display. Clicking the button sends the node content to the configured AI provider and populates the field with the AI-generated suggestion.

The button can be added to further content types and fields by applying the recipe again with different input values. Use a tailored prompt for each field (e.g. a different prompt for a title vs. a summary vs. an SEO description).

Post-installation

Select a default model — visit Administration > Configuration > AI to assign the default model for each operation type if you have not already done so.

FAQ

Why does this recipe require Thunder AI to be applied first instead of applying it automatically?

Drupal's recipe system supports recipe-to-recipe dependencies, but applies them unconditionally every time the dependent recipe runs. Because this recipe is designed to be applied multiple times — once per content type and field combination — declaring Thunder AI as a dependency would re-apply it on each run, asking all eight provider questions again and resetting the AI provider settings to the recipe defaults. The dependency is therefore enforced through documentation only.

Why does this recipe include a patch for drupal/ai_content_suggestions?

The PromptContentSuggestion plugin in drupal/ai_content_suggestions always renders the entity in the full view mode when building the AI prompt. The patch (issue #3590501) adds a configurable view mode setting, which this recipe exposes as an input. Without the patch the view mode input has no effect.

Can the recipe be applied more than once?

Yes. Applying the recipe again with a different content type or field name adds a new suggestion button without affecting existing ones. Each application targets a distinct core.entity_form_display.node.{content_type}.default config object.

Removing the recipe after installation

Once the recipe has been applied, you can unpack it to take full ownership of the installed packages. Use drupal/core-recipe-unpack to inline the recipe's Composer dependencies into your project's composer.json and remove the recipe package:


composer require drupal/core-recipe-unpack composer drupal:recipe-unpack drupal/thunder_ai_content_suggestions

Patch no longer applied after unpacking

This recipe ships a patch for drupal/ai_content_suggestions that adds view mode selection to the PromptContentSuggestion plugin. The patch is declared in the recipe's own composer.json and is applied automatically as long as the recipe package is present. After unpacking, the recipe package is removed and the patch is no longer applied.

To keep the patch working after unpacking, add it manually to the extra.patches section of your root composer.json:


"extra": { "patches": { "drupal/ai_content_suggestions": { "Issue #3590501: Add the ability to select a view mode to PromptContentSuggestion": "https://git.drupalcode.org/issue/ai_content_suggestions-3590501/-/commit/72bb48943b0f675a7c2c87fb283305997c5669de.diff" } } }

If your root composer.json already has an extra.patches section, merge the drupal/ai_content_suggestions key into it rather than replacing the existing entries.

Activity

Total releases
2
First release
May 2026
Latest release
4 days ago
Release cadence
0 days
Stability
0% stable

Releases

Version Type Release date
1.0.0-beta1 Pre-release May 17, 2026
1.0.x-dev Dev May 17, 2026