[GH-ISSUE #5745] [ERROR]: 400 Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead. #5271

Closed
opened 2026-06-05 14:53:02 -04:00 by yindo · 4 comments
Owner

Originally created by @GurenkoAPP on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5745

How are you running AnythingLLM?

Docker (local)

What happened?

I saw a similar post (#4307) already, but we're still experiencing the gpt-5.4-mini error. Could you please tell me if there's a solution?
Thanks in advance!

Are there known steps to reproduce?

No response

LLM Provider & Model (if applicable)

No response

Embedder Provider & Model (if applicable)

No response

Originally created by @GurenkoAPP on GitHub (Jun 2, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5745 ### How are you running AnythingLLM? Docker (local) ### What happened? I saw a similar post (#4307) already, but we're still experiencing the gpt-5.4-mini error. Could you please tell me if there's a solution? Thanks in advance! ### Are there known steps to reproduce? _No response_ ### LLM Provider & Model (if applicable) _No response_ ### Embedder Provider & Model (if applicable) _No response_
yindo added the possible bug label 2026-06-05 14:53:02 -04:00
yindo closed this issue 2026-06-05 14:53:02 -04:00
Author
Owner

@timothycarambat commented on GitHub (Jun 2, 2026):

We are going to need more information to help you. max_tokens or max_completion_tokens are not even sent in any OpenAI code execution path so i do not know where that issue is coming from.

When do you get this error?
What provider are you using (I am assuming OpenAI + gpt-5.4-mini).

If you are using like the generic OpenAI connector - just use the OpenAI official connector in this case? Since that is an official openai model

<!-- gh-comment-id:4602705529 --> @timothycarambat commented on GitHub (Jun 2, 2026): We are going to need more information to help you. `max_tokens` or `max_completion_tokens` are not even sent in any OpenAI code execution path so i do not know where that issue is coming from. When do you get this error? What provider are you using (I am assuming OpenAI + gpt-5.4-mini). If you are using like the generic OpenAI connector - just use the OpenAI official connector in this case? Since that is an official openai model
Author
Owner

@GurenkoAPP commented on GitHub (Jun 2, 2026):

We're using Generic OpenAI + gpt-5.4-mini. Or should we use OpenAI + gpt-5.4-mini specifically?

<!-- gh-comment-id:4608882140 --> @GurenkoAPP commented on GitHub (Jun 2, 2026): We're using Generic OpenAI + gpt-5.4-mini. Or should we use OpenAI + gpt-5.4-mini specifically?
Author
Owner

@timothycarambat commented on GitHub (Jun 3, 2026):

@GurenkoAPP If using an OpenAI model and their service. Just use the official OpenAI connector. It is more efficient and handles all of these nuances.

Why did you want to use the generic over the provider specific?

<!-- gh-comment-id:4614264149 --> @timothycarambat commented on GitHub (Jun 3, 2026): @GurenkoAPP If using an OpenAI model and their service. Just use the official OpenAI connector. It is more efficient and handles all of these nuances. Why did you want to use the generic over the provider specific?
Author
Owner

@GurenkoAPP commented on GitHub (Jun 4, 2026):

Unfortunately, OpenAI is not directly available in our country 🫠

<!-- gh-comment-id:4619356428 --> @GurenkoAPP commented on GitHub (Jun 4, 2026): Unfortunately, OpenAI is not directly available in our country 🫠
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5271