Skip to content

Rebrand to 'VoyageAI by MongoDB', refresh models, support Union contextualized inputs - #3

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

Rebrand to 'VoyageAI by MongoDB', refresh models, support Union contextualized inputs#3
fzowl wants to merge 1 commit into
voyageai_integrationfrom
feat/voyage-mongodb-rebrand-202609-b

Conversation

@fzowl

@fzowl fzowl commented Sep 8, 2026

Copy link
Copy Markdown
Owner

What & why

Follow-up on the VoyageAI connector (PR #1, branch voyageai_integration). Four related updates:

  1. Rebrand → "VoyageAI by MongoDB". VoyageAI was acquired by MongoDB; user-facing references in documentation now read VoyageAI by MongoDB (PACKAGES.md module description + example heading, and the connector class-level Javadoc). Code identifiers, package names, the api.voyageai.com host and the VOYAGE_API_KEY env var are intentionally left unchanged.
  2. Refreshed model list to what is currently available per docs.voyageai.com (verified against the embeddings, reranker, multimodal and pricing pages):
    • text embeddings: voyage-4-large, voyage-4, voyage-4-lite, voyage-code-4, voyage-finance-2, voyage-law-2 (older: voyage-3-large, voyage-3.5, …)
    • contextualized: voyage-context-4 (current), voyage-context-3
    • multimodal: voyage-multimodal-3.5 (current), voyage-multimodal-3
    • reranking: rerank-2.5, rerank-2.5-lite (preview: rerank-3, rerank-3-lite)
      Javadoc examples and integration-test default models were bumped to the current generation.
  3. Contextualized embeddings inputs now follows the official spec inputs: Union[List[List[str]], List[str]] (https://docs.voyageai.com/docs/contextualized-chunk-embeddings). Both formats are supported: the existing nested form (generateContextualizedEmbeddingsAsync(List<List<String>>), pre-chunked documents) and a new flat form (generateContextualizedEmbeddingsForDocumentsAsync(List<String>)) that sends full-document strings and enables server-side auto-chunking (input_type=document, enable_auto_chunking=true). Added unit coverage asserting the flat request shape.
  4. Response robustness: embedding/rerank response item DTOs now ignore unknown fields, matching the other response DTOs and the current API (which returns an extra text field on embedding items).

Base branch

Opened against voyageai_integration, not main, because the VoyageAI connector is not yet merged to main (it lives on PR #1). Branching from main would either produce an empty diff or duplicate the entire integration. This keeps the PR a clean rebrand delta stacked on PR #1; retarget to main once the integration merges.

Validation

Built and tested locally with JDK 17: mvnw -pl aiservices/voyageai test34 tests, 0 failures. This ran the live-API integration tests (a VOYAGE_API_KEY was present), confirming the new model ids (voyage-4-large, voyage-context-4, voyage-multimodal-3.5, rerank-2.5) work against the current VoyageAI API. spotbugs:check passes.

…t Union inputs for contextualized embeddings

- Rebrand user-facing VoyageAI references to 'VoyageAI by MongoDB' in PACKAGES.md and connector Javadoc.
- Update documented model lists to currently available models per docs.voyageai.com
  (voyage-4 family, voyage-context-4, voyage-multimodal-3.5, rerank-2.5); bump integration
  test defaults accordingly.
- Support the official contextualized embeddings inputs: Union[List[List[str]], List[str]]
  spec by adding a flat-document overload (generateContextualizedEmbeddingsForDocumentsAsync)
  with server-side auto-chunking, alongside the existing nested form; add unit coverage.
- Tolerate unknown fields on embedding/rerank response items to match current API responses.
@fzowl

fzowl commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

VERDICT:APPROVED

Reviewed the full diff — clean, well-scoped follow-up on the VoyageAI connector.

Correctness

  • ContextualizedEmbeddingRequest.inputs widened to Object to carry either the nested List<List<String>> (pre-chunked) or the flat List<String> (full documents) form. Jackson serializes by runtime type under @JsonProperty("inputs"), and @JsonInclude(NON_NULL) keeps the payload tight. Matches the official inputs: Union[List[List[str]], List[str]] spec.
  • New generateContextualizedEmbeddingsForDocumentsAsync correctly sets input_type=document and enable_auto_chunking=true, as the flat/document form requires. Shared sendRequest helper removes duplication between the two overloads.
  • @JsonIgnoreProperties(ignoreUnknown=true) on EmbeddingDataItem, RerankDataItem, and EmbeddingItem matches the sibling response DTOs and tolerates the extra text field the current API returns.

Fit — follows existing connector conventions (builder, Javadoc idiom, SuppressFBWarnings usage). Rebrand is user-facing only; code identifiers, package names, api.voyageai.com, and VOYAGE_API_KEY correctly left unchanged.

Breaking-change risk — low. getInputs() return type changes List<List<String>>Object (source-breaking), but the connector is unmerged (stacked on PR #1), so no external callers. Base branch voyageai_integration is the right target and is well justified in the description.

Tests — new unit test captures the outgoing request and asserts the flat shape plus input_type/enable_auto_chunking; model-id bumps propagated across unit + integration defaults. 34 tests / 0 failures reported.

Docs — PACKAGES.md and Javadoc model lists refreshed consistently, old models retained as historical references.

Minor (non-blocking): setInputs dropped its @SuppressFBWarnings("EI_EXPOSE_REP2") when the field became Object; PR confirms spotbugs:check still passes, so no action needed.

Nice work — approving.

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