Rule based routing
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3552834. --> Reported by: [david bishop](https://www.drupal.org/user/1163950) >>> <p>--- AI TRACKER METADATA ---<br> Update Summary: Rule Based Routing<br> Check-in Date: MM/DD/YYYY (US format) [When we should see progress/get an update]<br> Due Date: MM/DD/YYYY (US format) [When the issue should be fully completed]<br> Blocked by: [#XXXXXX] (New issues on new lines)<br> Additional Collaborators: @username1, @username2<br> AI Tracker found here: <a href="https://www.drupalstarforge.ai/">https://www.drupalstarforge.ai/</a><br> --- END METADATA ---</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>It would be useful to be able to abstract the selection of models away from the integration of AI to the use case. So that the site adminstrator can configure a set of model routing rules that can be simply attached to content modification.</p> <p>Example scenario where this would be useful.<br> A council website features information pages used for various editorial purposes, ranging from straightforward missed bin collection guidance to the foster care application process. If an automated short description is being generated from this there could be both very simple editorial and very large editorial chunks that need to be reasoned. It would be useful to be able to have a routing mechanism that could say "If message is under 4,000 tokens use Provider/Model X if it is over 4,000 tokens then use model Y".</p> <p>Attributes where it would be useful to have intelligent routing<br> - Context size (prompt size)<br> - User Account<br> - Remaining budget<br> - Rate Limit reached</p> <h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4> <p>Please provide information like AI modules enabled, which AI provider, browser, etc.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <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