Skip to content

feat(voyageai): refresh model-name constants to current Voyage models - #2

Open
fzowl wants to merge 1 commit into
mainfrom
feat/voyage-mongodb-rebrand-202609-b
Open

feat(voyageai): refresh model-name constants to current Voyage models#2
fzowl wants to merge 1 commit into
mainfrom
feat/voyage-mongodb-rebrand-202609-b

Conversation

@fzowl

@fzowl fzowl commented Sep 8, 2026

Copy link
Copy Markdown
Owner

What & why

Refreshes the convenience model-name constants for the three VoyageAI
Weaviate modules to match the models currently offered by Voyage AI, verified
against the official docs (embeddings, reranker, contextualized-chunk, pricing
pages on docs.voyageai.com).

Module Added (current) Kept (legacy)
text2vec-voyageai voyage-4-large, voyage-4, voyage-4-lite, voyage-code-4, voyage-finance-2, voyage-law-2, voyage-context-4 voyage-3-large, voyage-3.5, voyage-3.5-lite, voyage-3, voyage-3-lite, voyage-context-3
reranker-voyageai rerank-3, rerank-3-lite, rerank-2.5, rerank-2.5-lite rerank-2, rerank-2-lite, rerank-1, rerank-lite-1
multi2vec-voyageai voyage-multimodal-3.5, voyage-multimodal-3 (this class had no constants before)

Non-breaking: every pre-existing constant is retained (grouped as legacy);
the constants are only helpers — any model string can still be passed directly.

Scope notes (campaign tasks 1–4)

This repo is a client that configures Weaviate's server-side *-voyageai
modules via JSON schema
— it never calls Voyage's embedding API itself. That
determined what was in scope:

  1. Open-PR review — the fork (fzowl) has no open PRs. Upstream
    weaviate/java-client has 7 open PRs; the only one from a fork
    (cross-repository) is feat(collections): create from and read raw schema JSON weaviate/java-client#598 — "feat(collections): create from and read raw
    schema JSON"
    by @dudanogueira, state OPEN, mergeable. The other six are
    internal branches (fix(tenants): split tenant updates at the server's limit of 100 weaviate/java-client#616, fix(collections): nest the quantizer inside a dynamic index weaviate/java-client#613, fix(quantizers): use the field names the server actually reads weaviate/java-client#612, fix(rerankers): send the Nvidia reranker base URL as "baseURL" weaviate/java-client#610, fix: serialise OffsetDateTime as RFC 3339 weaviate/java-client#609, fix(query): allow rerank on every search operator weaviate/java-client#608).
  2. "VoyageAI by MongoDB" rebrandnot applied. There is no README/docs/UI
    prose that names VoyageAI in this repo. Every occurrence is an API identifier
    (class names, enum values, the server module strings text2vec-voyageai /
    multi2vec-voyageai / reranker-voyageai, method names) or a javadoc
    reference to those Weaviate modules. Renaming them would break the wire
    contract and users' source; injecting marketing text into Weaviate's javadoc
    isn't appropriate here. The task's "where relevant" qualifier resolves to
    nothing in this client.
  3. Model-list update — this PR (verified against docs.voyageai.com).
  4. contextualized_embed inputs: Union[List[List[str]], List[str]]not
    applicable.
    That is the Python voyageai SDK's API. This Java client has no
    embedding-call surface at all; it only sets model=voyage-context-4 on the
    text2vec-voyageai config and the Weaviate server performs the embedding
    calls. voyage-context-4 is now exposed as a constant.

Validation

No JDK/Maven is available in this environment, so the change was not compiled
locally. It is additive-only (new public static String/final String fields,
no new imports or logic), so risk is minimal; CI on this PR will validate the
build.

Update the convenience model-name constants for the VoyageAI modules to
match the models currently offered by Voyage AI (docs.voyageai.com).

- text2vec-voyageai: add voyage-4-large / voyage-4 / voyage-4-lite,
  voyage-code-4, voyage-finance-2, voyage-law-2 and the contextualized
  voyage-context-4 model.
- reranker-voyageai: add rerank-3 / rerank-3-lite / rerank-2.5 /
  rerank-2.5-lite.
- multi2vec-voyageai: add voyage-multimodal-3.5 / voyage-multimodal-3.

All existing constants are kept (now grouped as legacy) so the change is
source-compatible. Users can still pass any model string directly; these
constants are only convenience helpers.
@fzowl

fzowl commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

VERDICT:APPROVED

Reviewed the diff (3 files, +25/-2) and commit hygiene.

Correctness — Purely additive. New public static String model-name constants for the three VoyageAI modules, no logic/imports/wire changes. The model strings match the PR table and Voyage's documented naming (voyage-4-large/-4/-4-lite, voyage-code-4, voyage-finance-2, voyage-law-2, voyage-context-4; rerank-3/-3-lite/-2.5/-2.5-lite; voyage-multimodal-3.5/-3). The reranker reordering only moves RERANK_1/RERANK_LITE_1 down — values unchanged.

Conventions — Follows each file's existing style: the new reranker constants keep public static final String (consistent with that file), and the vectorizer constants match that file's public static String pattern and formatting. Added javadoc-style comments with official docs.voyageai.com links, which is an improvement over the previously bare constants.

Breaking-change risk — None. Every pre-existing constant is retained (grouped as "legacy"), so it's source- and wire-compatible. Constants are convenience helpers; arbitrary model strings can still be passed.

Tests / docs — No tests, which is appropriate: these are literal string constants with no behavior to exercise, matching the existing (untested) constants. No README/prose changes needed — the rebrand and contextualized_embed inputs tasks are correctly assessed as N/A for a client that only configures Weaviate's server-side modules.

Hygiene — Single commit authored by fzowl zoltan@voyageai.com, no trailers, no Co-Authored-By / "Generated with" text, no .claude/ files. Clean.

Minor nit (non-blocking, pre-existing): the vectorizer constants are non-final public static String, so they're technically reassignable; the new ones inherit that pattern. Worth tightening to final file-wide someday, but out of scope here. Not compiled locally (no JDK/Maven), but the additive-only nature makes that low-risk and CI will confirm.

LGTM.

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.

1 participant