AI CKEditor Summarize generates summaries in a different language than the selected text
<h2>Summary</h2>
<p>When the <strong>Summarize</strong> option is enabled in AI CKEditor, it generates a summary in a different language instead of summarizing the selected text in its original language.</p>
<p>This happens on a clean installation of the AI module 1.x branch. I have recorded videos showing the issue.</p>
<h2>Steps to reproduce</h2>
<ol>
<li>Install Drupal on a clean site.</li>
<li>Install and enable the AI module and AI CKEditor integration.</li>
<li>Configure an AI provider.</li>
<li>Go to <code>/admin/config/content/formats/manage/full_html</code>.</li>
<li>Enable the AI CKEditor assistant/tools for the Full HTML text format.</li>
<li>Enable the <strong>Summarize</strong> option.</li>
<li>Edit or create content using the Full HTML text format.</li>
<li>Select some text in CKEditor.</li>
<li>Use the <strong>Summarize</strong> action.</li>
</ol>
<h2>Expected result</h2>
<p>The selected text should be summarized.</p>
<h2>Actual result</h2>
<p>The summary is generated in a different language than the selected text.</p>
<h2>Environment</h2>
<ul>
<li><strong>Drupal version:</strong> Drupal 11</li>
<li><strong>Module version:</strong> AI 1.x</li>
<li><strong>PHP version:</strong> 8.3</li>
<li><strong>Provider:</strong> OpenAI / Anthropic</li>
</ul>
<h3>Screenshots / recordings</h3>
<p>I have attached video recordings showing the issue on a clean installation.</p>
{width=900 height=582}
{width=900 height=582}
<h3>Error messages or logs</h3>
{width=900 height=457}
issue