Repository navigation
QVAC-27164 feat[api|bc]: support EmbeddingGemma 2 multimodal embeddings - #5464
Open
maxim-smotrov wants to merge 8 commits into
Open
maxim-smotrov wants to merge 8 commits into
maxim-smotrov wants to merge 8 commits into
Conversation
Contributor
License compliance — cleanNo new dependency license findings in this PR. Warn-only (shadow) mode — this check does not block merges yet. Updated automatically by the canonical license compliance workflow. NOTICE presence (advisory)Missing NOTICE (advisory, does not block):
|
maxim-smotrov
marked this pull request as ready for review
October 30, 2026 18:11
Contributor
Review StatusCurrent Status: ❌ PENDING Pending reviews: Needs 1 Management or Team Lead, and 1 more from Management, Team Lead, or Member. |
maxim-smotrov
force-pushed
the
feat/sdk-embeddinggemma2
branch
from
October 30, 2026 18:27
539e642 to
9c4b45b
Compare
[Medium impact] The PR appears safe to merge; no new actionable issue remains. SummaryAdds ordered text, image, and audio batches to
|
Signed-off-by: Maksim Smatrou <maxim.smotrov@itrexgroup.com>
Signed-off-by: Maksim Smatrou <maxim.smotrov@itrexgroup.com>
maxim-smotrov
force-pushed
the
feat/sdk-embeddinggemma2
branch
from
November 2, 2026 16:47
a6a1068 to
f602b4e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 What problem does this PR solve?
SDK doesn't provide support for EmbeddingGemma 2 for multi-modal embeddings. The addon already added support in #5237.
📝 How does it solve it?
inputsbatches with text, file-path media, and base64 media while preserving the existingtextcalls.🧪 How was it tested?
💥 Breaking Changes
The generated Kotlin and Python
EmbedRequesttypes change because the shared request schema now represents two alternatives:EmbedTextRequestwith requiredtext, orEmbedInputsRequestwith requiredinputs. Each alternative forbids the other input field in the schema. This retains the explicit choice between text and ordered multimodal inputs instead of making both fields optional and relying only on runtime validation. The generators are unchanged.The TypeScript
embed()overloads preserve precise result types:text: stringreturns one vector, whiletext: string[]andinputsreturn a batch of vectors. These overloads do not cause the generated-client migration; the request schema union does. Existing TypeScript text calls remain supported.Kotlin
Direct construction of
EmbedRequestnow requires a request variant wrapper. The text value type is renamed fromEmbedRequestTexttoEmbedTextRequestText.BEFORE:
AFTER:
For text batches, use
EmbedTextRequestText.Variant2(texts)inside the same wrapper. For multimodal batches, useEmbedRequest.EmbedInputsRequestwrapping anEmbedInputsRequest. When inspecting a request typed asEmbedRequest, select the variant and read its fields through.value.The existing
QvacEmbeddings.embed(modelId, text)andembed(modelId, texts)convenience methods remain supported and need no caller migration.Python
The existing keyword constructor still works.
EmbedRequestis now a PydanticRootModelcontaining the selected request variant, so direct.model_id,.text, and.request_idaccess must move under.root.BEFORE:
AFTER:
For the
inputsvariant, readrequest.root.inputsafter selecting that variant. Continue passing the outerrequesttoembed(transport, request); do not replace it withrequest.root. Wire serialization remains flat, with norootorvaluefield added to the RPC payload.🔌 API Changes
Load the model with
modelConfig.projectionModelSrc, then pass text and media inputs:The result contains one vector per input.