Skip to content

[Enhancement]: Support custom reranker provider with configurable URL and model name #12119

Open

Description

@JumpLink

What features would you like to see added?

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:

webSearch:
  rerankerType: "custom"
  customRerankerApiUrl: "${CUSTOM_RERANKER_API_URL}"
  customRerankerApiKey: "${CUSTOM_RERANKER_API_KEY}"
  customRerankerModel: "qwen3-embedding-8b"

With corresponding environment variables:

CUSTOM_RERANKER_API_URL=https://api.scaleway.ai/v1/rerank
CUSTOM_RERANKER_API_KEY=your-api-key
CUSTOM_RERANKER_MODEL=qwen3-embedding-8b

Changes needed:

Which components are impacted by your request?

Endpoints

Pictures

No response

Related issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. danny-avila commented on Mar 7, 2026

    @danny-avila
    Collaborator

    Thanks for the request, on my list to finalize this PR: LibreChat-AI/rag-api#190

  2. mdbook commented on Jun 19, 2026

    @mdbook

    +1, ran into this exact thing self-hosting against a local Infinity reranker.

    two issues with the jina path right now:

    1. the model name is hardcoded to jina-reranker-v2-base-multilingual in @librechat/agents (tools/search/rerankers.ts), no way to override it
    2. 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 to jina-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.

  3. added a commit that references this issue on Aug 14, 2026
    80374dd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✨ enhancementNew feature or request🗺️ Backend Infracodegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions