Adding VoyageAI integration - #1
Conversation
…CONSTRUCTOR_THROW SpotBugs (bug-check profile) flagged CT_CONSTRUCTOR_THROW on classes whose constructors throw validation exceptions while being non-final, which the Java CI build treats as an error and fails merge-gatekeeper. Marking these value/service classes final removes the finalizer-attack vector SpotBugs warns about while preserving the existing constructor validation.
After merging upstream/main, the repository version advanced to 1.5.1-SNAPSHOT while the VoyageAI module still pinned the old 1.4.4-RC3-SNAPSHOT parent, which made the semantickernel-bom import unresolvable and broke the reactor build.
The VoyageAIModels request/response DTOs expose their mutable list and array fields directly through getters, setters and one constructor, which SpotBugs (bug-check profile) flags as EI_EXPOSE_REP/EI_EXPOSE_REP2. These are plain Jackson-mapped data holders, so annotate the individual accessors with @SuppressFBWarnings, matching the pattern already used by the other aiservices DTOs (e.g. HuggingFace, OpenAI, Google).
|
VERDICT:CHANGES_NEEDED The CI-repair objective this round was aimed at is met, and commit hygiene is clean — but there are correctness and convention issues that should be fixed before merge. What's solid
Should fix before merge
Items 1–4 are the ones I'd want addressed; the CI fixes themselves are correct and can stay as-is. |
CI-repair round — merge-gatekeeper statusInvestigated the Root cause is the fork-PR workflow-approval gate, not a code defect. All five upstream workflow runs on the head commit are stuck at
Combined commit status is The actual build is verified green locally on the current head (
The only unrelated local build noise is No code change is warranted for this scoped round (merge-gatekeeper only). The separate review items (blocking I/O, OkHttp version, etc.) are out of scope here and left untouched. |
|
VERDICT:CHANGES_NEEDED Thanks for this — it's a substantial, well-organized contribution. The diff is cleanly scoped (16 files vs the merge-base with Commit hygiene: clean. No That said, a few items should be addressed before merge: 1. Module missing from 2. HTTP client diverges from project convention (design — please justify or align). 3. Blocking I/O on the subscriber thread (reactive correctness). 4. Reactive contract violation (minor). Minor / optional:
None of these are blockers in spirit — (1) and (3) are the ones I'd want resolved, and (2) is worth a conscious decision from the maintainers. Happy to re-review once addressed. |
|
@johnoliver - Can you review this with a view to future direction of Microsoft Agent Framework. Happy to accept extra functionality in principle. |
What
Adds a VoyageAI integration module (
aiservices/voyageai) providing text embedding, multimodal embedding, contextualized embedding, and reranking services, plus a small reranking abstraction (TextRerankingService,RerankResult) insemantickernel-api.Why this round (CI repair)
The upstream PR (microsoft#345) was red on
merge-gatekeeper, which was blocked by theJava CIbuild failing under thebug-checkprofile. Root causes and fixes:CT_CONSTRUCTOR_THROW:RerankResultand the four VoyageAI service classes plusVoyageAIClientthrow validation exceptions from non-final constructors (finalizer-attack vector). Marked these classesfinal(behavior unchanged; validation preserved). This was the failure that stopped the CI build atsemantickernel-api.EI_EXPOSE_REP/EI_EXPOSE_REP2: theVoyageAIModelsJackson DTO accessors expose mutable list/array fields. Annotated the individual getters/setters/constructor with@SuppressFBWarnings, matching the existing pattern in the HuggingFace/OpenAI/Google DTOs. (This surfaced only after the first fix let the build reach the VoyageAI module.)upstream/main(which advanced the repo to1.5.1-SNAPSHOT); the VoyageAI module still pinned1.4.4-RC3-SNAPSHOT, which made thesemantickernel-bomimport unresolvable. Bumped the module's parent version to match.Validation
Full reactor build with the CI command
./mvnw -Pbug-check -DskipTests -Pcompile-jdk17 clean installpasses thesemantickernel-apiandaiservices/voyageaimodules (SpotBugs clean). The VoyageAI unit tests pass (33 run; 6 live-API integration tests skipped without credentials).Diff scope vs
upstream/mainis limited to the VoyageAI module, the two new reranking API files,PACKAGES.md, and the rootpom.xmlmodule entry.