Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "model_id" for route "ai.edit_model_settings_form" must match "[^/]++"
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3545188. -->
Reported by: [kevinquillen](https://www.drupal.org/user/317279)
Related to !958
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When using models from Ollama (or potentially other providers) that contain a slash or colon the provider form can become completely unavailable.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce (required for bugs, but not feature requests)</h4>
<p>Add a model like <a href="https://ollama.com/rjmalagon/gte-qwen2-1.5b-instruct-embed-f16">https://ollama.com/rjmalagon/gte-qwen2-1.5b-instruct-embed-f16</a> and visit the Ollama provider configuration page.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>One possible solution is updating the route definition with</p>
<pre>ai.edit_model_settings_form:<br> path: '/admin/config/ai/providers/{operation_type}/{provider}/{model_id}'<br> defaults:<br> _form: '\Drupal\ai\Form\AiModelSettingsForm'<br> _title_callback: '\Drupal\ai\Form\AiModelSettingsForm::createTitle'<br> requirements:<br> _permission: 'administer ai providers'<br> model_id: ".+"</pre><p>Though I am unaware of the implications of doing that. That brings the provider screen back up, but the edit form for that model is unavailable (leads to 404).</p>
> Related issue: [Issue #3530153](https://www.drupal.org/node/3530153)
issue