Skip to content

refactor: update default Gemini and Vertex AI embedder model to gemini-embedding-001#4571

Merged
whysosaket merged 2 commits intomainfrom
fix/update-deprecated-google-embedding-model
Mar 28, 2026
Merged

refactor: update default Gemini and Vertex AI embedder model to gemini-embedding-001#4571
whysosaket merged 2 commits intomainfrom
fix/update-deprecated-google-embedding-model

Conversation

@kartik-mem0
Copy link
Copy Markdown
Contributor

Linked Issue

Closes #3942

Description

Google deprecated text-embedding-004 in January 2026. This PR updates the default embedding model to gemini-embedding-001 across both the Gemini and Vertex AI embedders, along with their docs and
tests.

Changes:

  • mem0/embeddings/gemini.py — default model models/text-embedding-004 → models/gemini-embedding-001
  • mem0/embeddings/vertexai.py — default model text-embedding-004 → gemini-embedding-001
  • Updated docs for both google_AI.mdx and vertexai.mdx (examples + config tables)
  • Added tests verifying default model and embedding dims for both embedders
  • Updated existing Vertex AI test references from text-embedding-004 to gemini-embedding-001

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactor (no functional changes)
  • Documentation update

Breaking Changes

N/A

Test Coverage

  • I added/updated unit tests
  • I added/updated integration tests
  • I tested manually (describe below)
  • No tests needed (explain why)

All 13 embedding tests pass (test_gemini_emeddings.py + test_vertexai_embeddings.py).

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have added tests that prove my fix/feature works
  • New and existing tests pass locally
  • I have updated documentation if needed

@mintlify
Copy link
Copy Markdown
Contributor

mintlify bot commented Mar 27, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mem0 🟢 Ready View Preview Mar 27, 2026, 6:13 PM

@whysosaket whysosaket merged commit cd2dd7c into main Mar 28, 2026
9 checks passed
@whysosaket whysosaket deleted the fix/update-deprecated-google-embedding-model branch March 28, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC: Google deprecated the text-embedding-004 model - January 14, 2026

2 participants