Repository navigation
.Net: fix(vertex): use embedContent endpoint and Gemini schema for Vertex AI gemini embeddings - #14502
Open
Mayuri (mayuriphad) wants to merge 3 commits into
Open
.Net: fix(vertex): use embedContent endpoint and Gemini schema for Vertex AI gemini embeddings#14502Mayuri (mayuriphad) wants to merge 3 commits into
Mayuri (mayuriphad) wants to merge 3 commits into
Conversation
…I gemini embeddings
Mayuri (mayuriphad)
had a problem deploying
to
github-app-auth
September 29, 2026 06:05 — with
GitHub Actions
Failure
Mayuri (mayuriphad)
had a problem deploying
to
github-app-auth
September 29, 2026 06:05 — with
GitHub Actions
Failure
Mayuri (mayuriphad)
temporarily deployed
to
github-app-auth
October 5, 2026 02:50 — with
GitHub Actions
Inactive
Author
|
Hi maintainers, a gentle ping on this PR whenever you have a moment to review. I'm happy to make any changes or add tests if something needs adjusting. Thank you for your time! |
Mayuri (mayuriphad)
temporarily deployed
to
github-app-auth
October 10, 2026 10:02 — with
GitHub Actions
Inactive
This branch was previously 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.
Fixes #14265
Google Vertex AI recently launched newer Gemini embedding models (such as
gemini-embedding-2) that drop support for the legacy:predictendpoint (returning400 FAILED_PRECONDITION). Instead, they require the:embedContentendpoint using the newer Gemini schema.This PR updates the
VertexAIEmbeddingClientto:modelId.StartsWith("gemini-")).:embedContentinstead of:predictfor Gemini models.GoogleAIEmbeddingRequest.RequestEmbeddingContent) rather than the legacy Vertex instances format.:embedContentonly embeds a single text input and does not support:batchEmbedContents.For backward compatibility, all non-gemini embedding models on Vertex AI will continue to use
:predictwith batch instances.