mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[GH-ISSUE #10507] 400: <400> InternalError.Algo.InvalidParameter: Range of max_tokens should be [1, 8192] #135647
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @homestoo on GitHub (Feb 21, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/10507
Hello, after updating to the latest version v0.5.16, when I set the maximum number of tokens (num_predict) to a value greater than 8192, I encounter the following error:
400: <400> InternalError.Algo.InvalidParameter: Range of max_tokens should be [1, 8192]
This issue occurs whether I use the chat interface or the
/api/chat/completionsAPI endpoint.Since I am using content from a knowledge base, the token count returned by the vector model often exceeds 8192. It seems that the previous two versions did not have this maximum limit.
If I do not set the maximum number of tokens (num_predict) and use the default value, the openwebui chat can return content. However, when I call the knowledge base model using the
/api/chat/completionsAPI endpoint and the token count exceeds 8192, nothing is returned, and I get a 400 error.