[GH-ISSUE #4304] [BUG]: ChatGPT - gpt-5 model: 400 Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead. #2738

Closed
opened 2026-02-22 18:31:01 -05:00 by yindo · 1 comment
Owner

Originally created by @fkffm on GitHub (Aug 17, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4304

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

It seems that OpenAI changed the parameter name from max_tokens to max_completion_tokens for the gpt-5 model. Because of this, gpt-5 cannot be used in AnythingLLM and returns the following error:

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

Are there known steps to reproduce?

Configure AnythingLLM with the gpt-5 model. Testet with desktop app v1.8.5-r2.

Originally created by @fkffm on GitHub (Aug 17, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4304 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? It seems that OpenAI changed the parameter name from `max_tokens` to `max_completion_tokens` for the `gpt-5` model. Because of this, `gpt-5` cannot be used in AnythingLLM and returns the following error: > 400 Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead. ### Are there known steps to reproduce? Configure AnythingLLM with the `gpt-5` model. Testet with desktop app `v1.8.5-r2`.
yindo added the Integration Requestpossible bug labels 2026-02-22 18:31:01 -05:00
yindo closed this issue 2026-02-22 18:31:01 -05:00
Author
Owner

@serendipitYang commented on GitHub (Aug 21, 2025):

Same issue here.

@serendipitYang commented on GitHub (Aug 21, 2025): Same issue here.
yindo changed title from [BUG]: ChatGPT - gpt-5 model: 400 Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead. to [GH-ISSUE #4304] [BUG]: ChatGPT - gpt-5 model: 400 Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead. 2026-06-05 14:48:16 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2738