Rebrand to 'VoyageAI by MongoDB', refresh models, support Union contextualized inputs - #3
Conversation
…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.
|
VERDICT:APPROVED Reviewed the full diff — clean, well-scoped follow-up on the VoyageAI connector. Correctness
Fit — follows existing connector conventions (builder, Javadoc idiom, SuppressFBWarnings usage). Rebrand is user-facing only; code identifiers, package names, Breaking-change risk — low. Tests — new unit test captures the outgoing request and asserts the flat shape plus Docs — PACKAGES.md and Javadoc model lists refreshed consistently, old models retained as historical references. Minor (non-blocking): Nice work — approving. |
What & why
Follow-up on the VoyageAI connector (PR #1, branch
voyageai_integration). Four related updates:PACKAGES.mdmodule description + example heading, and the connector class-level Javadoc). Code identifiers, package names, theapi.voyageai.comhost and theVOYAGE_API_KEYenv var are intentionally left unchanged.voyage-4-large,voyage-4,voyage-4-lite,voyage-code-4,voyage-finance-2,voyage-law-2(older:voyage-3-large,voyage-3.5, …)voyage-context-4(current),voyage-context-3voyage-multimodal-3.5(current),voyage-multimodal-3rerank-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.
inputsnow follows the official specinputs: 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.textfield on embedding items).Base branch
Opened against
voyageai_integration, notmain, because the VoyageAI connector is not yet merged tomain(it lives on PR #1). Branching frommainwould either produce an empty diff or duplicate the entire integration. This keeps the PR a clean rebrand delta stacked on PR #1; retarget tomainonce the integration merges.Validation
Built and tested locally with JDK 17:
mvnw -pl aiservices/voyageai test→ 34 tests, 0 failures. This ran the live-API integration tests (aVOYAGE_API_KEYwas 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:checkpasses.