PluginNotFoundException when saving field with "Enable AI Automator" checked but no Type selected
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3536567. -->
Reported by: [sijumpk](https://www.drupal.org/user/389053)
Related to !766
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When enabling AI Automator on a field without selecting a "Choose AI Automator Type", an error occurs when accessing the AI Automator Run Order tab.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4>
<ol>
<li>Enable AI Automator module</li>
<li>Go to Structure > Content types > Article > Manage fields.</li>
<li>Edit the Body field.</li>
<li>Check the "Enable AI Automator" checkbox.</li>
<li>When "Choose AI Automator Type" appears, do not select any value.</li>
<li>Save the field settings.</li>
<li>Visit the "AI Automator Run Order" tab at: /admin/structure/types/manage/article/automator_chain.</li>
</ol>
<p>The following error is triggered:</p>
<blockquote><p><em>Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist. Valid plugin IDs for Drupal\ai_automators\PluginManager\AiAutomatorTypeManager are: llm_json_field, llm_audio_to_string_long, llm_simple_string, llm_video_to_video, llm_simple_string_long, llm_text_with_summary, llm_simple_text, llm_address, llm_integer, llm_string_long, llm_decimal, llm_image_generation, llm_text, llm_list_string, llm_video_to_text_long, llm_string, llm_media_Audio_generation, llm_json_native_field, llm_json_native_binary_field, llm_video_to_image, vector_search_text_long, llm_link, llm_list_float, llm_simple_text_with_summary, llm_email, llm_video_to_string_long, llm_moderation_state, llm_audio_to_text_with_summary, vector_search_entity_reference, llm_audio_generation, llm_boolean, llm_office_hours, llm_entity_reference, llm_list_integer, llm_float, llm_video_to_html, llm_chart_from_text, llm_audio_to_text_long, llm_rewrite_image_filename, llm_image_alt_text, llm_telephone, llm_taxonomy, llm_custom_field, llm_media_image_generation, llm_text_long, llm_faq_field, llm_metatag, llm_simple_text_long in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).</em></p></blockquote>
<p>Attaching screen recording and screenshot of the error.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Add validation to ensure a Type is selected when enabling AI Automator.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3>Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)</h3>
issue