AI agents explorer chat generation does not support o1 series of models.
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3569280. -->
Reported by: [alexortega_98](https://www.drupal.org/user/3711404)
Related to !231
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When I tried to use my o4-mini model with the chat generation, I found out that this models do not use `max_tokens` parameter like most of the models, but instead, they use `max_completion_tokens`, which leads to the following error when trying to use the chat generator: </p>
<p><code>Error invoking model response: Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.</code></p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>1. Add a o1 series chat model using your provider /admin/config/ai/providers<br>
2. Visit /admin/config/ai/explorers/chat_generator<br>
3. Select the o1 series module you just added, on the provider configuration<br>
4. Add a message and click "Ask the AI"</p>
<p>I used the azure provider from Microsoft Azure AI module, to create the chat model o4-mini.</p>
issue