You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Enhancement]: Support custom reranker provider with configurable URL and model name #12119
Add support for a custom reranker type in the web search configuration, allowing users to specify their own Jina-compatible reranking endpoint with a custom URL, API key, and model name.
Currently only jina and cohere are supported as reranker providers, and model names are hardcoded. Many providers (Scaleway, vLLM, LiteLLM, etc.) offer Jina-compatible /v1/rerank endpoints with different model names. The documentation already mentions "Planned Rerankers: Additional third-party reranking services".
More details
The configuration would look like this in librechat.yaml:
+1, ran into this exact thing self-hosting against a local Infinity reranker.
two issues with the jina path right now:
the model name is hardcoded to jina-reranker-v2-base-multilingual in @librechat/agents (tools/search/rerankers.ts), no way to override it
there's no custom reranker type, just jina and cohere
jinaApiUrl already lets you point somewhere else and that part works great (Infinity serves a jina-style /rerank). the problem is the hardcoded model name, so my reranker has to answer tojina-reranker-v2-base-multilingual. my current hack is aliasing the real model under that name with Infinity's --served-model-name. it works, but it's gross: the served name is now decoupled from the actual model, and anything else hitting that endpoint (a memory service, in my case) has to send the fake name too.
rerankerType: custom + customRerankerModel would just fix it. would love to see it land. this is a UI built around local LLMs and reranking is basically the last thing still pinned to a cloud provider's model name.
Activity
danny-avila commentedon Mar 7, 2026
Thanks for the request, on my list to finalize this PR: LibreChat-AI/rag-api#190
mdbook commentedon Jun 19, 2026
+1, ran into this exact thing self-hosting against a local Infinity reranker.
two issues with the jina path right now:
jina-reranker-v2-base-multilingualin@librechat/agents(tools/search/rerankers.ts), no way to override itcustomreranker type, just jina and coherejinaApiUrlalready lets you point somewhere else and that part works great (Infinity serves a jina-style/rerank). the problem is the hardcoded model name, so my reranker has to answer tojina-reranker-v2-base-multilingual. my current hack is aliasing the real model under that name with Infinity's--served-model-name. it works, but it's gross: the served name is now decoupled from the actual model, and anything else hitting that endpoint (a memory service, in my case) has to send the fake name too.rerankerType: custom+customRerankerModelwould just fix it. would love to see it land. this is a UI built around local LLMs and reranking is basically the last thing still pinned to a cloud provider's model name.feat: add custom reranker provider support in web search config