Which SDK / package
Python SDK (mem0ai) — MemoryClient / AsyncMemoryClient
Describe the bug
MemoryClient.__init__ only accepts an explicit host= argument or hardcodes https://api.mem0.ai. It does not read MEM0_HOST or MEM0_API_URL, so proxy / private-gateway deployments must patch code or always pass host= in every process.
The OpenCode plugin request in #6498 documents the same need. Python host-path should honor the same env fallback used by many API clients:
host argument > MEM0_HOST > MEM0_API_URL > default https://api.mem0.ai
(Custom header injection can stay out of scope for this issue.)
Reproduction
import os
from unittest.mock import patch
os.environ["MEM0_HOST"] = "https://mem0-proxy.example.com"
os.environ["MEM0_API_KEY"] = "m0sk_test"
# Illustrative: after fix, MemoryClient().host should be the proxy URL
Expected behavior
When host is omitted, construct the client against MEM0_HOST or MEM0_API_URL if set.
Which SDK / package
Python SDK (
mem0ai) —MemoryClient/AsyncMemoryClientDescribe the bug
MemoryClient.__init__only accepts an explicithost=argument or hardcodeshttps://api.mem0.ai. It does not readMEM0_HOSTorMEM0_API_URL, so proxy / private-gateway deployments must patch code or always passhost=in every process.The OpenCode plugin request in #6498 documents the same need. Python host-path should honor the same env fallback used by many API clients:
hostargument >MEM0_HOST>MEM0_API_URL> defaulthttps://api.mem0.ai(Custom header injection can stay out of scope for this issue.)
Reproduction
Expected behavior
When
hostis omitted, construct the client againstMEM0_HOSTorMEM0_API_URLif set.