I was trying to test out the simple crawler with automation and CKEditor similar to what happens here:
https://www.youtube.com/watch?v=NVlrFPdF1jk&t=3531s

it worked fine with GPT-4.1-mini but when switching to GPT-5-mini I get:

This model does not support Max Tokens, but max_completion_tokens

Also, with GPT-5-mini you can't change the temperature and it says:

It only supports the defaul 1

I suggest custom loading of fields and values based on models, probably not an easy feat to just add this but moving forward each model might come with specific parameters

CommentFileSizeAuthor
#3 openai_provider_changes.patch1.05 KBakalsey

Comments

doxigo created an issue. See original summary.

keiserjb’s picture

Make sure your https://www.drupal.org/project/ai_provider_openai module is using 1.2 and is updated.

It has added this code.

// Do this change for o1, o3 and gpt-5 models.
    if (str_starts_with($model_id, 'gpt-5') || str_starts_with($model_id, 'o1') || str_starts_with($model_id, 'o3')) {
      if (array_key_exists('max_tokens', $generalConfig)) {
        $generalConfig['max_completion_tokens'] = $generalConfig['max_tokens'];
        unset($generalConfig['max_tokens']);
      }
    }
akalsey’s picture

StatusFileSize
new1.05 KB

For anyone that can't update to an alpha, I've created a patch with this change for use until 1.2 is released

marcus_johansson’s picture

Project: AI (Artificial Intelligence) » OpenAI Provider
Component: ...to be triaged » Code
b_sharpe’s picture

Status: Active » Closed (outdated)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.