From 7cc8fc5112cd4949c7d9e5584ab4b7228076a0f1 Mon Sep 17 00:00:00 2001 From: Pratik Narola Date: Sat, 23 May 2026 15:03:02 +0530 Subject: [PATCH] deploy: route embedder through OpenAI-compat proxy instead of Ollama The custom OpenAI-compatible endpoint (LiteLLM) serves the same qwen3-embedding model and is reachable from the container in all deployments; direct Ollama may not be. Vectors stay compatible because the underlying model is the same. Captured from a beast production hotfix. --- backend/mem0_manager.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/mem0_manager.py b/backend/mem0_manager.py index 3547023..abe080f 100644 --- a/backend/mem0_manager.py +++ b/backend/mem0_manager.py @@ -102,10 +102,16 @@ class Mem0Manager: }, }, "embedder": { - "provider": "ollama", + # Route embeddings through the OpenAI-compatible LiteLLM proxy + # rather than Ollama directly — the proxy is reachable from the + # container in all deployments, Ollama may not be. The model + # name is the same (qwen3-embedding:4b-q8_0); existing vectors + # generated via this path stay compatible. + "provider": "openai", "config": { "model": settings.embedding_model, - "ollama_base_url": settings.ollama_base_url, + "api_key": settings.openai_api_key, + "openai_base_url": settings.openai_base_url, "embedding_dims": settings.embedding_dims, }, },