@supermemory/tools v2.0.0 unifies the API across all four integrations (Vercel AI SDK, OpenAI, Mastra, VoltAgent) around a single config-object signature and a consistent conversation-grouping concept. This guide walks you through the breaking changes.
This release is breaking. Update calls and re-test before bumping in
production.
What changed at a glance
| Area | v1.4.x | v2.0.0 |
|---|---|---|
| Signature | withSupermemory(model, "user-123", { ... }) | withSupermemory(model, { containerTag: "user-123", ... }) |
| Conversation grouping | conversationId (Vercel/OpenAI), threadId (Mastra) | customId everywhere |
customId | Optional | Required — throws if missing or empty |
containerTag | Positional argument | Required field on options object |
addMemory default | "never" | "always" |
VoltAgent verbose | Hardcoded to false | Honored from options |
Install
1. Vercel AI SDK
2. OpenAI SDK
containerTag and customId are validated and throw with explicit error messages if missing.
3. Mastra
Processor constructors and factory functions both moved to a single options argument.threadId is gone — use customId instead.
In server setups, Mastra’s
RequestContext thread ID still takes precedence
over the construction-time customId — the option now acts as the fallback
when no per-request thread ID is provided.4. VoltAgent
VoltAgent already used a config-object signature, so the call shape is unchanged. Two behavior fixes ship in v2.0.0:verbose: trueis now honored (was hardcoded tofalsein v1.4.x).- A runtime warning is logged when advanced search params (
threshold,limit,rerank,rewriteQuery,filters,include,searchMode) are set whilemode: "profile"— those parameters are ignored in profile mode.
verbose: false implicitly while passing verbose: true, you will now see logs. Adjust as needed.
5. New default: addMemory: "always"
Across all four integrations, addMemory now defaults to "always". If your v1.4.x code relied on the old default of "never", set it explicitly:
Conversation persistence
In v1.4.x the Vercel middleware fell back toclient.add with a synthesized customId when no conversationId was passed. In v2.0.0, because customId is required, all conversation persistence goes through the /v4/conversations endpoint via addConversation. There is no fallback path.
Migration checklist
Find every withSupermemory / processor call
Grep your codebase for
withSupermemory(, SupermemoryInputProcessor,
SupermemoryOutputProcessor, createSupermemoryProcessor,
createSupermemoryOutputProcessor.Move containerTag into the options object
Drop the positional
containerTag argument and add it to the options
object.Rename conversationId / threadId to customId
Make sure every call site provides a non-empty
customId.