The AI Agent prompt override form prevent YAML overrides from being saved and used correctly.

Created on 29 July 2025, 7 days ago

Problem/Motivation

- The config form AiAgentPromptChanger is hardcoding 'agent_id' (with quotes) rather than using a variable.
- YAML overrides are stored with escaped newlines (\r\n) instead of standard YAML format, preventing successful validation and saving to the databse.

Steps to reproduce

  1. Go to /admin/config/ai/agents/settings/[agent_id]
  2. Click "override" link next to a prompt
  3. Modify the YAML content
  4. Save the form
  5. Check the stored configuration - it contains escaped newlines
  6. The agent continues to use the original prompt instead of the override

Proposed resolution

  • Change 'agent_id' to $agent_id in buildForm()
  • Properly extract agent settings and config
  • Parse the original file and create standardized YAML for comparison
  • Compare parsed YAML content instead of raw file content
  • Improve variable handling

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Active

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Scott Weston

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

Comments & Activities

Production build 0.71.5 2024