max_tokens and best_of reject a value equal to their configured limit
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 25/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C++
- Estrellas
- 952
- Forks
- 285
- Merge medio
- 3 d 5 h
- PR fusionados (30 d)
- 45
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de openvinotoolkit/model_server
-
KServe REST parser drops requested outputs except the lastPosiblemente ocupada @YugShah1510 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
openvinotoolkit/model_server#4690 ·
Los mantenedores suelen responder en 2 días
-
KServe REST rejects INT64 and UINT64 values outside 32-bit rangePosiblemente ocupada @YugShah1510 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
openvinotoolkit/model_server#4688 ·
Los mantenedores suelen responder en 2 días
-
Preserve double precision when parsing FP64 REST inputsPosiblemente ocupada @YugShah1510 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
openvinotoolkit/model_server#4686 ·
Los mantenedores suelen responder en 2 días
-
Rerank with an empty documents array or object documents fails with an internal tokenizer errorPosiblemente ocupada @Daksha1611 la tomó hace 5 días. Abierto
Dificultad 4/5 1-2 días Aptitud para principiantes 24/100
openvinotoolkit/model_server#4671 ·
Los mantenedores suelen responder en 2 días
-
Downloading an image from a URL has no timeoutPosiblemente ocupada @Daksha1611 la tomó hace 6 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
openvinotoolkit/model_server#4669 ·
Los mantenedores suelen responder en 2 días
Todos los issues de openvinotoolkit/model_server
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
macOS: a double-click on a notarized altairsim is refused, and the docs give only the offline casePosiblemente ocupada @anhaoXie la tomó hoy. Abiertodocumentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
mutationpp/Mutationpp#337 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bulletphysics/bullet3#4819 ·
-
[YSQL] Local-node initdb reads postgres.bki, but YB clusters bootstrap only from yb_postgres.bkiAbiertoarea/ysql kind/enhancement priority/low status/awaiting-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
yugabyte/yugabyte-db#35763 ·
Los mantenedores suelen responder en 1 día