Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Rerank with an empty documents array or object documents fails with an internal tokenizer error

Aperta
#4,671 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@Daksha1611 ci sta già lavorando.

Dal 19/10/2026.

  • #4672 di @Daksha1611 — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
24/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
backend

Direzione di ricerca

Read rerank_calculator_ov.cc where the calculator reads getDocumentsList() and calls the tokenizer, then inspect rerank_handler_test.cpp for how empty and object documents are parsed. Reproduce the request with a rerank model and trace how the empty list reaches tokenization. Done means these inputs return a clear 400 response instead of an internal tokenizer error; the report notes a rerank model is needed for end-to-end verification.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

RerankHandler::parseRequest() accepts "documents": [] and documents given as {"title", "text"}
objects. The rerank calculator only reads getDocumentsList() (rerank_calculator_ov.cc), which is
empty in both cases: object documents are parsed into documentsMap, which is not used yet (the docs
list dictionary documents as unsupported, and parseResponse has a TODO for the map). The
calculator then calls the tokenizer with an empty list.

With a real Qwen3 tokenizer, encode() of an empty list throws:

Exception from src/inference/src/cpp/infer_request.cpp:224:
Exception from src/plugins/intel_cpu/src/graph.cpp:1626:
Node SpecialTokensSplit_122229 of type Reference
basic_string::_M_create

The calculator catches the exception and returns its message as an internal error, so the client
gets an opaque 500 instead of a message saying the documents are not supported or are missing.

Two documents given as objects with the same title also collapse into one, because the map is keyed
by title.

I checked the parsing and the tokenizer call separately; I did not run the calculator end to end,
since that needs a rerank model.

To Reproduce

curl http://localhost:8000/v3/rerank -H "Content-Type: application/json" \
  -d '{"model": "<rerank model>", "query": "hello", "documents": []}'

The same with "documents": [{"title": "a", "text": "Welcome"}].

Expected behavior

A 400 that says what is wrong: "documents array should not be empty" or "documents given as objects
are not supported, use an array of strings".

Logs

The tokenizer exception above.

Configuration

  1. OVMS version: main @ eec7daac
  2. rerank servable
  3. N/A
  4. N/A
  5. N/A

Additional context

The existing tests deliberately expect object documents to parse into the map
(rerank_handler_test.cpp), so I left the parser alone and checked after it.

I have a patch with tests and will open a PR.

Lingua principale
C++
Stelle
952
Fork
285
Merge medio
3g 5h
PR unite (30g)
45

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di openvinotoolkit/model_server

Tutte le issue di openvinotoolkit/model_server

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.