max_tokens and best_of reject a value equal to their configured limit
メンテナーはふだん 3 日以内に返信
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C++
- スター
- 947
- フォーク
- 280
- 平均マージ
- 3日 14時間
- マージ済み PR(30日)
- 46
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openvinotoolkit/model_server のほかの issue
-
Rerank with an empty documents array or object documents fails with an internal tokenizer error対応中かも @Daksha1611 が 1 日前に担当しました。 オープン
難易度 4/5 1〜2日 初心者へのやさしさ 24/100
openvinotoolkit/model_server#4671 ·
メンテナーはふだん 3 日以内に返信
-
Downloading an image from a URL has no timeout対応中かも @Daksha1611 が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
openvinotoolkit/model_server#4669 ·
メンテナーはふだん 3 日以内に返信
-
/v1/tokenize returns a flat list when the text array holds a single string対応中かも @Daksha1611 が 3 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
openvinotoolkit/model_server#4664 ·
メンテナーはふだん 3 日以内に返信
-
String-typed tool call arguments are rewritten when the text is valid JSON対応中かも @Daksha1611 が 3 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
openvinotoolkit/model_server#4662 ·
メンテナーはふだん 3 日以内に返信
-
/v3/audio/speech ignores response_format and always returns 32-bit float WAV対応中かも @michalkulakowski が 21 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
openvinotoolkit/model_server#4613 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
openvinotoolkit/model_server の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ROCm/rocm-libraries#14027 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
Qiskit/qiskit-aer#2487 ·
メンテナーはふだん 1 日以内に返信
-
GUI
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
qbittorrent/qBittorrent#25104 ·
メンテナーはふだん 2 日以内に返信
-
P2: A timed rotation maneuver does nothing on a ship that had an earlier timed lateral maneuverオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
scp-fs2open/fs2open.github.com#7914 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信