Consider moving AI sub-module specific composer.json requirements into suggest rather than require
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3478274. --> Reported by: [scott_euser](https://www.drupal.org/user/3267594) Related to !166 !165 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>We have many composer.json dependencies that are required by specific sub-modules only like qdrant, pinecone, openai, and anthropic. </p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Composer require drupal/ai installs all these things</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Proposed? Maybe... lets get opinions</p> <ol> <li>We can move to 'suggest' instead of 'require' (<a href="https://getcomposer.org/doc/04-schema.md#suggest">https://getcomposer.org/doc/04-schema.md#suggest</a>) </li> <li>Then add hook_requirements per sub-module to check that the dependency exists (class_exists call?)</li> <li>Then block install phase with a message like "Run composer require ... first in order to install this sub-module" </li> </ol> <p>Harder for users to explore sub-modules and perhaps won't work with this like the WASM env or SimplyTest.me any more as users won't have a way to install via composer. Perhaps the latter two bits are deal-breaker and we should stick to as is?</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>Decide what to do</p> <h3 id="summary-ui-changes">User interface changes</h3> <p>N/A</p> <h3 id="summary-api-changes">API changes</h3> <p>N/A</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>N/A</p>
issue