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> ![ai-ckeditor-summarize-language-bug-2026-07-01_16-50-15](/uploads/207f81860fa61fd231b658cba6a55e57/ai-ckeditor-summarize-language-bug-2026-07-01_16-50-15.mov){width=900 height=582} ![ai-ckeditor-summarize-language-bug-2026-07-01_16-50-41](/uploads/b5d68beb408ff9bcc4f9126a342ad55e/ai-ckeditor-summarize-language-bug-2026-07-01_16-50-41.mov){width=900 height=582} <h3>Error messages or logs</h3> ![Screenshot_2026-07-01_at_4.55.15_PM](/uploads/5d5c7dd6071baae07e9ba9abd67e6d1a/Screenshot_2026-07-01_at_4.55.15_PM.png){width=900 height=457}
issue