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

オープン 初心者向け
#607 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java
領域
api

調査の方向性

記載されている rerankers/NvidiaReranker.java ファイルから始め、baseUrl フィールドがどのようにシリアライズおよびデシリアライズされるかを確認します。新しい設定では baseURL を使用し、古い baseUrl 設定も引き続き読み取れるように、そのマッピングを更新します。設定された URL がデフォルトのエンドポイントにフォールバックせずに reranker-nvidia モジュールへ到達すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Corrected. The original report had this backwards: it claimed 28 classes used the wrong key. They are all correct. rerankers/NvidiaReranker.java — cited in the original as the good example — is the one broken class. Rewritten below with the evidence.

Summary

rerankers/NvidiaReranker.java sends the base URL as baseUrl. The reranker-nvidia module reads baseURL. The value is stored in the schema and then ignored, so reranking silently goes to the default NVIDIA endpoint rather than the configured one.

Every other module config in the client (28 classes across vectorizers, generative and CohereReranker) already uses baseURL and is correct.

Why baseURL is canonical

Modules read the key through BaseClassSettings.GetPropertyAsString, which bottoms out in a plain case-sensitive map lookup — usecases/modulecomponents/settings/class_settings_property_helper.go:

value := h.GetSettings(cfg)[name]

and every module passes "baseURL":

// modules/text2vec-cohere/ent/class_settings.go
return cs.BaseClassSettings.GetPropertyAsString("baseURL", DefaultBaseURL)

// modules/reranker-nvidia/config/class_settings.go
return cs.propertyValuesHelper.GetPropertyAsString(cs.cfg, "baseURL", DefaultBaseURL)

text2vec-weaviate goes further and declares an explicit migration away from the lowercase spelling — modules/text2vec-weaviate/module.go:

{Name: "baseUrl", NewName: "baseURL"},

Empirical confirmation

Weaviate 1.39.0, reranker-nvidia enabled, base URL pointed at a stub reranker on the host. Two collections identical but for the key spelling:

baseURL  ->  stub receives POST /v1/retrieval/nvidia/reranking
             query returns the stub's scores: [{"score":2},{"score":1}]

baseUrl  ->  stub receives nothing
             "explorer: get class: extend: extend rerank: client rank:
              connection to NVIDIA API failed with status: 401"

The 401 is the module falling back to the real NVIDIA endpoint — the configured URL never reached it.

What misled the original report

Two modules inject their default config under the key nobody reads:

// modules/text2vec-cohere/config.go, modules/text2vec-nvidia/config.go
"baseUrl": ent.DefaultBaseURL,

So for those two modules a baseURL sent by the client appears in the echoed schema next to a baseUrl default, which reads as "unrecognized passthrough key alongside the module's real default". It is the opposite: the client's key is the one the module reads, and the server's default is the one it ignores. Harmless in practice (the reader's fallback default is the same value), but worth reporting upstream as a server-side inconsistency.

Fix

@SerializedName(value = "baseURL", alternate = {"baseUrl"}) on NvidiaReranker.baseUrl, so new configs are written with the key the module reads and configs written by older clients still deserialize.

Version

  • java-client 6.3.1
  • Weaviate 1.39.0
主要言語
Java
スター
34
フォーク
30
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

weaviate/java-client のほかの issue

weaviate/java-client の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。