Skip to content

fix(rerankers): send the Nvidia reranker base URL as "baseURL" - #610

Open
dudanogueira wants to merge 2 commits into
mainfrom
fix/nvidia-reranker-baseurl
Open

dudanogueira wants to merge 2 commits into
mainfrom
fix/nvidia-reranker-baseurl

Conversation

@dudanogueira

@dudanogueira dudanogueira commented Aug 25, 2026 •

Copy link
Copy Markdown

Problem

NvidiaReranker sends the base URL as baseUrl, but reranker-nvidia reads baseURL. The configured URL is stored and then ignored, so reranking goes to the default NVIDIA endpoint.

Fix

  • Serialize the field as baseURL, with alternate = "baseUrl" so configs stored under baseUrl by older client versions still read.
  • Add a JSONTest row for reranker-nvidia.

Breaking changes

None.

Closes #607

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

@orca-security-eu orca-security-eu Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 NvidiaReranker JSON field name to baseURL with a Gson alternate for legacy baseUrl.
  • Add a focused unit test to verify legacy deserialization and canonical serialization for NvidiaReranker.
  • Add a JSONTest row to ensure reranker-nvidia serializes baseURL as 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 bevzzz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove all comments from the diff.

Remove NvidiaRerankerTest; the JSONTest row covers serialization.
Use the single-string form for the 'baseUrl' alternate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v6: NvidiaReranker sends "baseUrl"; the module reads "baseURL"

3 participants