Unable to change assistant model, when current not available
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3541483. -->
Reported by: [anaconda777](https://www.drupal.org/user/3595801)
Related to !871 !1278 !870
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When trying to change AI assistant provider from the "AI provider" dropdown, it is not possible<br>
IF the current provider is not available.</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>
<p>Enable ollama for example and vllm.<br>
create assistant and select your local ollama model there in the AI provider.<br>
Now make the local ollama unavailable for Drupal, (stop the ollama for example)</p>
<p>Go to assistant:<br>
/admin/config/ai/ai-assistant/ai_test_chatbot</p>
<p>Try to change the current provider from the Ai Provider dropdown.<br>
Result: IT does not let you change cos the current (in this case Ollama) is not available for drupal. </p>
<p>it just gives error and the model dropdown for the new model is empty, so you cant choose any. </p>
<pre>Failed to get models from Ollama: Server error: `GET http://ai.test.net/api/tags` resulted in a `503 Service Unavailable` response: <html><body><h1>503 Service Unavailable</h1> No server is available to handle this request. </body></html><br>1 error has been found:</pre><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