Skip to content

Commit f8270c8

Browse files
seanzhougooglecopybara-github
authored andcommitted
fix(deps): bump google-genai minimum to >=1.64.0 for gemini-embedding-2-preview
The gemini-embedding-2-preview model requires the Vertex AI :embedContent endpoint instead of the legacy :predict endpoint used by older models (text-embedding-004, text-embedding-005). In google-genai <1.64.0, embed_content() unconditionally routed to :predict on Vertex AI, which returns FAILED_PRECONDITION for this model. v1.64.0 (googleapis/python-genai@af40cc6) introduced model-aware dispatch in embed_content(): models with "gemini" in the name are routed to :embedContent via t_is_vertex_embed_content_model(), while older text-embedding-* models continue to use :predict. This version also enforces a single-content-per-call limit for the embedContent API, which is why FilesRetrieval sets embed_batch_size=1. Co-authored-by: Xiang (Sean) Zhou <seanzhougoogle@google.com> PiperOrigin-RevId: 883689438
1 parent 4010716 commit f8270c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dependencies = [
4444
"google-cloud-spanner>=3.56.0, <4.0.0", # For Spanner database
4545
"google-cloud-speech>=2.30.0, <3.0.0", # For Audio Transcription
4646
"google-cloud-storage>=2.18.0, <4.0.0", # For GCS Artifact service
47-
"google-genai>=1.56.0, <2.0.0", # Google GenAI SDK
47+
"google-genai>=1.64.0, <2.0.0", # Google GenAI SDK
4848
"graphviz>=0.20.2, <1.0.0", # Graphviz for graph rendering
4949
"httpx>=0.27.0, <1.0.0", # HTTP client library
5050
"jsonschema>=4.23.0, <5.0.0", # Agent Builder config validation

0 commit comments

Comments
 (0)