Allow users to specify private key name
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3559878. -->
Reported by: [mxr576](https://www.drupal.org/user/315522)
>>>
<h2 id="problem">Problem/Motivation</h2>
<p>The module currently generates private key names automatically in <code>\Drupal\ai_provider_amazeeio\Form\AmazeeioAiConfigForm::generatePrivateKeyName()</code> using <code>\Drupal::request()->getHost()</code>. This approach works well when each Drupal site connected to an Amazee AI subscription (team) runs on unique domains.</p>
<p>However, many project-specific development environments run on shared domains such as <code>localhost</code> or <code>*.ddev.site</code>. When multiple team members work on the same project using these shared domains, they can inadvertently connect their local development environments to the same LLM and vector database instance, causing conflicts and confusion. This complicates defining a consistent setup process for Amazee AI across local development, internal/external UAT, and production environments.</p>
<h2 id="proposed-resolution">Proposed resolution</h2>
<p>Expose the private key name field on the Amazee AI (trial) setup form and allow users to specify a custom private key name. The implementation should include:</p>
<ul>
<li>Add a form element for the private key name on the Amazee AI configuration/trial setup form.</li>
<li>Pre-fill the field with the current auto-generated value as the default (derived from <code>generatePrivateKeyName()</code>).</li>
<li>Allow users to override the default value with their own custom name.</li>
<li>Add a clear description to the form element explaining:
<ul>
<li>That this value is used to identify the private key in Amazee AI.</li>
<li>That unique values per environment and per developer are recommended to avoid accidental sharing of LLM/vectorDB instances.</li>
</ul>
</li>
</ul>
<h2 id="remaining-tasks">Remaining tasks</h2>
<h2 id="user-interface-changes">User interface changes</h2>
<ul>
<li>Add a new text field for “Private key name” on the Amazee AI (trial) setup/configuration form.</li>
<li>Include descriptive help text highlighting why choosing a unique name per environment/developer is important.</li>
</ul>
<h2 id="api-changes">API changes</h2>
<p>None.</p>
<h2 id="data-model-changes">Data model changes</h2>
<p>None, since the private key name do not get stored.</p>
issue