max_tokens and best_of reject a value equal to their configured limit
Maintainer thường phản hồi trong vòng 3 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Inspect the validation checks in openai_api_handler.cpp for max_tokens and best_of, and compare them with openai_completions.cpp and openai_responses.cpp. Locate the existing limit-validation tests, then verify that all four fields accept values equal to their configured limits. The issue is already covered by an open pull request, so confirm its scope and test coverage before starting.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
docs/llm/reference.md describes max_tokens_limit and best_of_limit as the maximum value
accepted by the endpoint. The check for max_tokens and best_of rejects a request that sends
exactly that value, while the other token-limit fields accept it:
| field | check | accepts a value equal to the limit |
|---|---|---|
| max_tokens | !(value < limit) (openai_api_handler.cpp) |
no |
| best_of | !(value < limit) (openai_api_handler.cpp) |
no |
| max_completion_tokens | value > limit (openai_completions.cpp) |
yes |
| max_output_tokens | value > limit (openai_responses.cpp) |
yes |
With max_tokens_limit: 1000 and the default best_of_limit: 20, running the validation code with
a value equal to the limit gives:
max_tokens 1000 -> max_tokens exceeds limit provided in graph config: 1000
max_completion_tokens 1000 -> accepted
max_output_tokens 1000 -> accepted
best_of 20 -> best_of exceeds limit provided in graph config: 20
When max_tokens is omitted the server fills in the limit itself (1000), a value that an explicit
request cannot send.
No test sends a value equal to either limit.
To Reproduce
- Graph with
max_tokens_limit: 1000(or the defaultbest_of_limitof 20). - POST /v3/chat/completions with
"max_tokens": 1000, or"best_of": 20. - 400
... exceeds limit provided in graph config.
Expected behavior
A value equal to the configured limit is accepted, for all four fields.
Logs
None.
Configuration
- OVMS version: main @ eec7daac
- LLM servable with max_tokens_limit or best_of_limit
- N/A
- N/A
- N/A
Additional context
I have a patch with tests and will open a PR.
- Ngôn ngữ chính
- C++
- Star
- 947
- Fork
- 280
- Merge trung bình
- 3 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 46
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openvinotoolkit/model_server
-
Rerank with an empty documents array or object documents fails with an internal tokenizer errorCó thể đã có người làm @Daksha1611 đã nhận 2 ngày trước. Đang mở
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 24/100
openvinotoolkit/model_server#4671 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Downloading an image from a URL has no timeoutCó thể đã có người làm @Daksha1611 đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
openvinotoolkit/model_server#4669 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
/v1/tokenize returns a flat list when the text array holds a single stringCó thể đã có người làm @Daksha1611 đã nhận 4 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
openvinotoolkit/model_server#4664 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
String-typed tool call arguments are rewritten when the text is valid JSONCó thể đã có người làm @Daksha1611 đã nhận 4 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
openvinotoolkit/model_server#4662 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
/v3/audio/speech ignores response_format and always returns 32-bit float WAVCó thể đã có người làm @michalkulakowski đã nhận 22 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
openvinotoolkit/model_server#4613 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của openvinotoolkit/model_server
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
metasequoiaime/msime#9113 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
tone-3000/tone3000-plugin#257 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Locked plugin flip-flops position on every refresh after being disabledCó thể đã có người làm @Illustar0 đã nhận hôm nay. Đang mởissue report
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
ModOrganizer2/modorganizer#2449 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement P5
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
open-astro/AlpacaBridge#1468 ·
Maintainer thường phản hồi trong vòng 1 ngày