Repository navigation
fix(rerankers): send the Nvidia reranker base URL as "baseURL" - #610
Open
dudanogueira wants to merge 2 commits into
Open
dudanogueira wants to merge 2 commits into
dudanogueira wants to merge 2 commits into
Conversation
reranker-nvidia looks the key up verbatim, so the "baseUrl" spelling was
stored in the schema and then ignored: reranking silently went to the
default NVIDIA endpoint instead of the configured one.
Verified against Weaviate 1.39.0 with a stub reranker endpoint. Two
collections identical but for the key spelling:
baseURL -> the stub is called, the query returns the stub's scores
baseUrl -> no call to the stub, "connection to NVIDIA API failed
with status: 401" from the real endpoint
Every other module config in this client already uses "baseURL", which
matches the server: each module reads it through a case-sensitive map
lookup, and text2vec-weaviate goes as far as declaring the migration
{Name: "baseUrl", NewName: "baseURL"}.
The alternate keeps configs written by older versions of this client
readable, so upgrading turns a wrong value into a working one rather
than a missing one.
Closes #607
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WmY5dAGWCccWDoqkKNC2JU
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
There was a problem hiding this comment.
Pull request overview
This PR fixes a config serialization mismatch for the reranker-nvidia collection reranker by ensuring the NVIDIA base URL is serialized under the canonical baseURL key (while remaining backward-compatible with legacy baseUrl data). This aligns the Java client’s emitted schema config with what the Weaviate reranker-nvidia module actually reads.
Changes:
- Update
NvidiaRerankerJSON field name tobaseURLwith a Gsonalternatefor legacybaseUrl. - Add a focused unit test to verify legacy deserialization and canonical serialization for
NvidiaReranker. - Add a
JSONTestrow to ensurereranker-nvidiaserializesbaseURLas expected.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/main/java/io/weaviate/client6/v1/api/collections/rerankers/NvidiaReranker.java | Serialize base URL as baseURL (with legacy baseUrl alternate) for reranker-nvidia. |
| src/test/java/io/weaviate/client6/v1/api/collections/rerankers/NvidiaRerankerTest.java | New tests covering legacy baseUrl deserialization and canonical baseURL serialization. |
| src/test/java/io/weaviate/client6/v1/internal/json/JSONTest.java | Adds a JSON golden-row for reranker-nvidia verifying baseURL output. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
bevzzz
requested changes
Sep 10, 2026
bevzzz
left a comment
Collaborator
There was a problem hiding this comment.
Please remove all comments from the diff.
Remove NvidiaRerankerTest; the JSONTest row covers serialization. Use the single-string form for the 'baseUrl' alternate.
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.
Problem
NvidiaRerankersends the base URL asbaseUrl, butreranker-nvidiareadsbaseURL. The configured URL is stored and then ignored, so reranking goes to the default NVIDIA endpoint.Fix
baseURL, withalternate = "baseUrl"so configs stored underbaseUrlby older client versions still read.JSONTestrow forreranker-nvidia.Breaking changes
None.
Closes #607