Support mapped enums for AI tool property input
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3522221. --> Reported by: [andrewbelcher](https://www.drupal.org/user/655282) Related to !578 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>In some cases, you want to use an enum, but the values don't have any explicit description, e.g. if constants are backed by integers. For the LLM to chose, it needs a description.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Expand the enum to support <code>oneOf</code>/<code>anyOf</code> with <code>const</code>/<code>title</code> so values can be described.</p> <h3 id="summary-api-changes">API changes</h3> <p><code>ToolsPropertyInputInterface::setEnum</code> becomes slightly more permissive in the data types it takes.</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>The tool output sent to LLM will swap out <code>oneOf</code>/<code>anyOf</code> for mapped types.</p>
issue