Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead

I am using tools AI agent (with OpenAI o3-mini model) for one of my automations. I get the following error when I assign max tokens.
Unsupported parameter: ‘max_tokens’ is not supported with this model. Use ‘max_completion_tokens’ instead.

While the error is self explanatory. I can’t find the option max_completion_tokens there.

Hi @rahulm,

Welcome to the community :tada:

Tip for sharing your workflow in the forum

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

Make sure that you’ve removed any sensitive information from your workflow and include dummy data or pinned data as much as you can!


I couldn’t reproduce your issue, could you tell me which version of n8n you’re using and paste the workflow json of the AI Agent so we can have a look at your setup? (See above on how to paste your workflow here)

Please see the AI agent node I’m using.
n8n Version 1.79.3

@aya Can you please take a look at this when you get a chance? Thanks.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.