Component
Python SDK
Description
Summary
Both mem0 SDKs (Python and TS) fall back to gemini-2.0-flash when no Gemini model is specified. Google retired the Gemini 2.0 Flash family from the API on June 1, 2026 (https://ai.google.dev/gemini-api/docs/deprecations), so the Gemini provider fails out of the box unless the user explicitly overrides the model.
Fallback locations:
mem0/llms/gemini.py:37 --> if not self.config.model: self.config.model = "gemini-2.0-flash"
mem0-ts/src/oss/src/llms/google.ts:13 --> same default in the TS SDK
mem0/configs/llms/gemini.py:35 --> docstring recommends the retired ID
Steps to Reproduce
from mem0 import Memory
config = {
"llm": {
"provider": "gemini",
"config": {"api_key": "<GOOGLE_API_KEY>"}, # no model specified
}
}
m = Memory.from_config(config)
m.add("I prefer window seats", user_id="u1")
Expected Behavior
Configuring the Gemini provider with just an API key works --> the default model is one Google currently serves.
Actual Behavior
The request is rejected by the Gemini API with a model-not-found / deprecated-model error, because the hardcoded fallback gemini-2.0-flash was retired June 1, 2026. (Tests pin the same ID but mock the API calls, so CI stays green through the retirement.)
Related, not yet failing: the default OpenAI model rides the Oct 23, 2026 shutdown (https://platform.openai.com/docs/deprecations) in several load-bearing spots — server/main.py:116 (DEFAULT_LLM_MODEL → gpt-4.1-nano-2025-04-14), mem0/configs/llms/base.py:34, mem0/llms/base.py:59 (o1/o3-mini), the dashboard defaults (server/dashboard/src/app/setup/page.tsx:446, .../configuration/page.tsx:152), and ~15 examples/ files. Flagging now since one sweep is cheaper than incident-driven fixes in October.
Happy to open a PR for the Gemini fallback if maintainers pick a target model (Google's docs point at the 2.5/3.x line).
Found by running arol, a deprecation scanner I built after a vendor retirement broke our own production - filing because the Gemini half is live breakage.
Environment
- mem0 version: current
main (cloned 2026-07-29)
- Python/Node version: N/A - the failing ID is hardcoded in source
- OS: N/A
Component
Python SDK
Description
Summary
Both mem0 SDKs (Python and TS) fall back to
gemini-2.0-flashwhen no Gemini model is specified. Google retired the Gemini 2.0 Flash family from the API on June 1, 2026 (https://ai.google.dev/gemini-api/docs/deprecations), so the Gemini provider fails out of the box unless the user explicitly overrides the model.Fallback locations:
mem0/llms/gemini.py:37-->if not self.config.model: self.config.model = "gemini-2.0-flash"mem0-ts/src/oss/src/llms/google.ts:13--> same default in the TS SDKmem0/configs/llms/gemini.py:35--> docstring recommends the retired IDSteps to Reproduce
Expected Behavior
Configuring the Gemini provider with just an API key works --> the default model is one Google currently serves.
Actual Behavior
The request is rejected by the Gemini API with a model-not-found / deprecated-model error, because the hardcoded fallback
gemini-2.0-flashwas retired June 1, 2026. (Tests pin the same ID but mock the API calls, so CI stays green through the retirement.)Related, not yet failing: the default OpenAI model rides the Oct 23, 2026 shutdown (https://platform.openai.com/docs/deprecations) in several load-bearing spots —
server/main.py:116(DEFAULT_LLM_MODEL→gpt-4.1-nano-2025-04-14),mem0/configs/llms/base.py:34,mem0/llms/base.py:59(o1/o3-mini), the dashboard defaults (server/dashboard/src/app/setup/page.tsx:446,.../configuration/page.tsx:152), and ~15examples/files. Flagging now since one sweep is cheaper than incident-driven fixes in October.Happy to open a PR for the Gemini fallback if maintainers pick a target model (Google's docs point at the 2.5/3.x line).
Found by running arol, a deprecation scanner I built after a vendor retirement broke our own production - filing because the Gemini half is live breakage.
Environment
main(cloned 2026-07-29)