System Prompt in AI module on Drupal 11 – Always forced to default prompt

Created on 10 March 2025, about 2 months ago

Problem encountered:
When I modify the System Prompt in the AI Assistants's admin interface on Drupal 11, the modification is correctly saved in the config table and visible in the UI. However, OpenAI continues to receive the old default prompt instead of the user-defined value.

Steps to reproduce the bug:

- Add the following in settings.php:
$settings['ai_assistant_advanced_mode_enabled'] = TRUE;
- Go to Configuration > AI Assistants.
Modify the System Prompt and save.
- Clear the cache
Check the requests sent to OpenAI in AI Logging

The default prompt is still used instead of the custom prompt.

Expected behavior
The AI module should correctly apply the System Prompt defined by the user and send it to OpenAI.

🐛 Bug report
Status

Active

Version

1.0

Component

AI Assistants API

Created by

🇵🇫French Polynesia laurentb Tahiti

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024