Currently, the reranker implementation only supports Jina and Cohere as hardcoded providers. The model names are also hardcoded (jina-reranker-v2-base-multilingual for Jina, rerank-v3.5 for Cohere).
Many Jina-compatible reranking APIs exist (e.g. Scaleway Generative APIs, vLLM, LiteLLM) that use the same /v1/rerank request/response format but require different model names. Currently there is no way to use these without forking the code.
Proposal
Add a new rerankerType: 'custom' option that allows users to configure:
customRerankerApiUrl – The full reranking endpoint URL (e.g. https://api.scaleway.ai/v1/rerank)
customRerankerApiKey – API key for authentication
customRerankerModel – Model name to send in the request (e.g. qwen3-embedding-8b)
The custom reranker would use the Jina-compatible /v1/rerank format, which is becoming a de facto standard:
// Request
{ "model": "<model>", "query": "...", "documents": [...], "top_n": 3 }
// Response
{ "results": [{ "index": 0, "document": { "text": "..." }, "relevance_score": 0.95 }] }
Related issues
Currently, the reranker implementation only supports Jina and Cohere as hardcoded providers. The model names are also hardcoded (
jina-reranker-v2-base-multilingualfor Jina,rerank-v3.5for Cohere).Many Jina-compatible reranking APIs exist (e.g. Scaleway Generative APIs, vLLM, LiteLLM) that use the same
/v1/rerankrequest/response format but require different model names. Currently there is no way to use these without forking the code.Proposal
Add a new
rerankerType: 'custom'option that allows users to configure:customRerankerApiUrl– The full reranking endpoint URL (e.g.https://api.scaleway.ai/v1/rerank)customRerankerApiKey– API key for authenticationcustomRerankerModel– Model name to send in the request (e.g.qwen3-embedding-8b)The custom reranker would use the Jina-compatible
/v1/rerankformat, which is becoming a de facto standard:Related issues