Repository navigation
feat(api): NVIDIA NIM reranker and embeddings providers - #5697
Merged
Merged
Conversation
Adds an `nvidia` reranker (native /retrieval/<model>/reranking wire format, rankings[].logit scores, batched to the API's 512-passage cap with bounded concurrency) and an `nvidia` embeddings provider (/embeddings with a native input_type=query/passage, configurable dimensions and batch size, shared concurrency cap and retries). Closes #5551
Review fixes: a failing slice no longer leaves its siblings running unobserved (same pattern as the embeddings batcher); test that a slice's 4xx surfaces as UpstreamHTTPError.
This was referenced Oct 20, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5551.
What
nvidiareranker — NVIDIA's ranking API is not Cohere-compatible (per-model path/retrieval/<model>/reranking,{query:{text}}/passages:[{text}]body,rankings[].logitresponse). One request per distinct query, split intoBATCH_SIZEslices (hosted API caps at 512 passages), run concurrently underMAX_CONCURRENT. Raw logits go through recall's existing sigmoid normalization.HINDSIGHT_API_RERANKER_NVIDIA_{API_KEY,MODEL,BASE_URL,TIMEOUT,BATCH_SIZE,MAX_CONCURRENT}, also per failover-chain member.nvidiaembeddings — OpenAI-shaped/embeddingsplus theinput_type(query/passage) NVIDIA's retrieval models need, so it overridesencode_query/encode_documentslike ZeroEntropy and ignores the generic prefixes. Uses the shared batching/concurrency cap (EMBEDDINGS_MAX_CONCURRENT_REQUESTS) and retry policy.HINDSIGHT_API_EMBEDDINGS_NVIDIA_{API_KEY,MODEL,BASE_URL,DIMENSIONS,BATCH_SIZE}. Defaultnvidia/llama-nemotron-embed-vl-1b-v2at 1024 dims so it fits pgvector's 2000-dim HNSW limit;nemotron-3-embed-1b(2048 only) needs vchord/pgvectorscale..env.example(+ embed copy), generated skill docs.Testing
NVIDIA_LIVE_API_KEY) against the real NVIDIA API — passing.hindsight-apion a vchord Postgres withnvidia/nemotron-3-embed-1bat 2048 dims + NVIDIA reranker + NVIDIA-hosted LLM: retain → recall → reflect all correct; vectors stored at 2048 dims withvchordrqindexes.