OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

[Feature]: Jev rerank cannot pass provider preferences (extra_body) and logs response bodies on errors

Open ragnos-dev opened this issue 2 weeks ago • 1 comments

Version

OpenViking v0.5.4 (9dfa9017a). The same code is on current main (checked 2026-11-13).

Summary

The Jev rerank client (openviking/models/rerank/jev_rerank.py) builds its request body from the model, state and questions only, and RerankConfig ignores unknown keys, so there is no way to send provider preferences that a router such as OpenRouter supports (for example zero data retention or data_collection: deny).

Separately, an HTTP error is logged with the full response body, and any other failure with the exception text. Both can echo the reranked passages into the server log.

Reproduction

  1. Set rerank.extra_body in ov.conf. It is dropped and the request body is unchanged.
  2. Make the rerank endpoint return 400 with a body that quotes the request. The body appears in the server log.

Proposed fix

  • A rerank.extra_body mapping merged into each request body (the client's own fields win).
  • Error logs that record the status code or the exception type only.

We run a local patch that does both and are happy to open a PR.

ragnos-dev avatar Nov 13 '26 14:11 ragnos-dev

Opened #8578: adds RerankConfig.extra_body and merges it into the Jev and OpenAI-compatible request bodies (flat and nested DashScope). The error-path log half of this report no longer applies on main — those paths now record only the exception type — so the PR addresses extra_body alone.

2SinceJuly avatar Nov 27 '26 08:11 2SinceJuly