From a7ed68e6975cbf6bc692c7a7a33c87926b14501a Mon Sep 17 00:00:00 2001 From: Kartik Date: Fri, 26 Jun 2026 13:59:33 +0530 Subject: [PATCH] docs(integrations): fix retired model IDs, v3 response shapes & vercel deps (#5842) --- docs/integrations/agno.mdx | 2 +- docs/integrations/autogen.mdx | 4 +- docs/integrations/langchain-tools.mdx | 53 +++++++++++---------------- docs/integrations/langgraph.mdx | 2 +- docs/integrations/pipecat.mdx | 2 +- docs/integrations/vercel-ai-sdk.mdx | 13 ++++--- 6 files changed, 35 insertions(+), 41 deletions(-) diff --git a/docs/integrations/agno.mdx b/docs/integrations/agno.mdx index a4a32a791..faccf06ba 100644 --- a/docs/integrations/agno.mdx +++ b/docs/integrations/agno.mdx @@ -73,7 +73,7 @@ client = MemoryClient() # Define the agent agent = Agent( name="Personal Agent", - model=OpenAIChat(id="gpt-4"), + model=OpenAIChat(id="gpt-5-mini"), description="You are a helpful personal agent that helps me with day to day activities." "You can process both text and images.", markdown=True diff --git a/docs/integrations/autogen.mdx b/docs/integrations/autogen.mdx index a7d12947c..c7299fbb7 100644 --- a/docs/integrations/autogen.mdx +++ b/docs/integrations/autogen.mdx @@ -43,7 +43,7 @@ OPENAI_API_KEY = os.environ.get('OPENAI_API_KEY') memory_client = MemoryClient() agent = ConversableAgent( "chatbot", - llm_config={"config_list": [{"model": "gpt-4", "api_key": OPENAI_API_KEY}]}, + llm_config={"config_list": [{"model": "gpt-5-mini", "api_key": OPENAI_API_KEY}]}, code_execution_config=False, human_input_mode="NEVER", ) @@ -99,7 +99,7 @@ For more complex scenarios, you can create multiple agents: manager = ConversableAgent( "manager", system_message="You are a manager who helps in resolving complex customer issues.", - llm_config={"config_list": [{"model": "gpt-4", "api_key": OPENAI_API_KEY}]}, + llm_config={"config_list": [{"model": "gpt-5-mini", "api_key": OPENAI_API_KEY}]}, human_input_mode="NEVER" ) diff --git a/docs/integrations/langchain-tools.mdx b/docs/integrations/langchain-tools.mdx index 833e2bc0e..2d73ad1f0 100644 --- a/docs/integrations/langchain-tools.mdx +++ b/docs/integrations/langchain-tools.mdx @@ -98,20 +98,9 @@ add_result = add_tool.invoke(add_input) ```json Output { - "results": [ - { - "memory": "Name is Alex", - "event": "ADD" - }, - { - "memory": "Is a vegetarian", - "event": "ADD" - }, - { - "memory": "Is allergic to nuts", - "event": "ADD" - } - ] + "message": "Memory processing has been queued for background execution", + "status": "PENDING", + "event_id": "3a1b2c3d-4e5f-6789-abcd-ef0123456789" } ``` @@ -173,23 +162,25 @@ result = search_tool.invoke(search_input) ``` ```json Output -[ - { - "id": "1a75e827-7eca-45ea-8c5c-cfd43299f061", - "memory": "Name is Alex", - "user_id": "alex", - "hash": "d0fccc8fa47f7a149ee95750c37bb0ca", - "metadata": { - "food": "vegan" - }, - "categories": [ - "personal_details" - ], - "created_at": "2024-11-27T16:53:43.276872-08:00", - "updated_at": "2024-11-27T16:53:43.276885-08:00", - "score": 0.3810526501504994 - } -] +{ + "results": [ + { + "id": "1a75e827-7eca-45ea-8c5c-cfd43299f061", + "memory": "Name is Alex", + "user_id": "alex", + "hash": "d0fccc8fa47f7a149ee95750c37bb0ca", + "metadata": { + "food": "vegan" + }, + "categories": [ + "personal_details" + ], + "created_at": "2024-11-27T16:53:43.276872-08:00", + "updated_at": "2024-11-27T16:53:43.276885-08:00", + "score": 0.3810526501504994 + } + ] +} ``` diff --git a/docs/integrations/langgraph.mdx b/docs/integrations/langgraph.mdx index 4254b225b..7c0fa4101 100644 --- a/docs/integrations/langgraph.mdx +++ b/docs/integrations/langgraph.mdx @@ -41,7 +41,7 @@ load_dotenv() # MEM0_API_KEY = 'your-mem0-key' # Replace with your actual Mem0 API key # Initialize LangChain and Mem0 -llm = ChatOpenAI(model="gpt-4") +llm = ChatOpenAI(model="gpt-5-mini") mem0 = MemoryClient() ``` diff --git a/docs/integrations/pipecat.mdx b/docs/integrations/pipecat.mdx index 6cdb05b41..63f15bb23 100644 --- a/docs/integrations/pipecat.mdx +++ b/docs/integrations/pipecat.mdx @@ -121,7 +121,7 @@ async def websocket_endpoint(websocket: WebSocket): # LLM for response generation llm = OpenAILLMService( api_key=os.getenv("OPENAI_API_KEY"), - model="gpt-3.5-turbo", + model="gpt-5-mini", system_prompt="You are a helpful assistant that remembers past conversations." ) diff --git a/docs/integrations/vercel-ai-sdk.mdx b/docs/integrations/vercel-ai-sdk.mdx index 0df6a85eb..cdf39d00a 100644 --- a/docs/integrations/vercel-ai-sdk.mdx +++ b/docs/integrations/vercel-ai-sdk.mdx @@ -26,12 +26,12 @@ Install the SDK provider and AI SDK: npm install @mem0/vercel-ai-provider ai@^6 ``` -### Peer Dependencies +### Dependencies -`@mem0/vercel-ai-provider` v3.0.0 requires: -- `ai` v6+ (`^6.0.199`) -- `@ai-sdk/provider` v3+ (`^3.0.10`) -- Provider packages at v3+: `@ai-sdk/openai@^3`, `@ai-sdk/anthropic@^3`, `@ai-sdk/google@^3`, `@ai-sdk/groq@^3`, `@ai-sdk/cohere@^3` +`@mem0/vercel-ai-provider` bundles `ai`, all `@ai-sdk/*` provider packages, and `@ai-sdk/provider` as regular dependencies — you do **not** need to install them separately. The install command above (`npm install @mem0/vercel-ai-provider ai@^6`) is sufficient. + +The only true peer dependency is `zod` (optional): +- `zod` v3+ (`^3.0.0`) — required only if you use Zod schemas in tool definitions ## Getting Started @@ -305,6 +305,8 @@ These options can be passed per-request when creating a model instance: | `rerank` | `boolean` | Enable reranking of results | | `page` | `number` | Page number for pagination | | `page_size` | `number` | Results per page | +| `mem0ApiKey` | `string` | Mem0 API key; overrides the `MEM0_API_KEY` env var | +| `host` | `string` | Custom Mem0 API base URL for self-hosted deployments | ## Key Features @@ -312,6 +314,7 @@ These options can be passed per-request when creating a model instance: - `retrieveMemories()`: Retrieves memory context for prompts as a formatted system prompt string. - `getMemories()`: Get memories from your profile in array format. - `addMemories()`: Adds user memories to enhance contextual responses. +- `searchMemories()`: Searches memories and returns the raw results array (semantic search rather than the full retrieval pipeline). ## Migrating from v2.x