Repository navigation
Migrate Pipecat SDK to Supermemory v5 - #1872
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | a9b23e0 | Nov 04 2026, 07:30 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | a9b23e0 | Commit Preview URL Branch Preview URL |
Nov 04 2026, 07:30 PM |
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
| limit=self.params.search_limit, | ||
| threshold=self.params.search_threshold, | ||
| ) | ||
| responses = dict(zip(calls, await asyncio.gather(*calls.values()))) |
There was a problem hiding this comment.
A failed search now throws away the profile too. asyncio.gather has no return_exceptions, so if /search errors, the whole call raises MemoryRetrievalError and nothing is injected, even when /profile returned fine. The old /v4/profile endpoint caught search errors server-side and still returned the profile.
Repro with the real v5 client + httpx.MockTransport: profile 200 + search 500 → MemoryRetrievalError, and the static fact is dropped.
Suggest keeping whichever call succeeded:
results = await asyncio.gather(*calls.values(), return_exceptions=True)
responses = {}
for name, result in zip(calls, results):
if isinstance(result, Exception):
logger.warning(f"Supermemory {name} failed: {result}")
else:
responses[name] = result
if calls and not responses:
raise MemoryRetrievalError("Failed to retrieve memories", results[0])| self.user_id, | ||
| query=query, | ||
| search_mode="memories", | ||
| limit=self.params.search_limit, |
There was a problem hiding this comment.
search_limit above 100 now breaks retrieval on every turn. Before, the limit was applied client-side (slice), so any value worked. Now it's sent as the v5 limit, which the server caps at 100 (max(100) in the search contract) → 400. Combined with the gather issue above, the profile is lost too.
Suggest capping it on InputParams (line 152):
search_limit: int = Field(default=10, ge=1, le=100)| raw_search_results = _field(search_results_response, "results", default=[]) or [] | ||
| search_results = list(raw_search_results)[: self.params.search_limit] | ||
| profile = _field(responses.get("profile"), "profile") | ||
| search_results = list(_field(responses.get("search"), "results", default=[]) or []) |
There was a problem hiding this comment.
The "[3d ago]" labels are gone for search results. v5 moved updatedAt under system (system.updated_at on the SDK model), but format_memories_to_text still reads only the top-level updatedAt / updated_at (utils.py#L181).
Repro: a v5 search result with system.updatedAt formats as - Plans a trip to Lisbon instead of - [3d ago] Plans a trip to Lisbon.
The test doesn't catch it because the mock search payload ({"memory": "Plans a trip"}) has no system or similarity. Suggest falling back to _field(_field(item, "system"), "updatedAt", "updated_at") in the formatter and using the real v5 result shape in the mock.
Summary
idfield.user_idinterface, pass its value as the v5 namespace, normalize v5 profile facts for injection, and update the package and integration docs.supermemory-pipecatto0.2.0and requiresupermemory>=5.0.0,<6.Verification
bun install --frozen-lockfilepassed.supermemory==5.0.1andpipecat-ai==1.7.0: 12 package tests passed; wheel build and dependency check passed.supermemory==5.0.0andpipecat-ai==0.0.98: 12 package tests and dependency check passed./profile,/search, and/documentrequests with the expected fields.bun run --cwd packages/memory-graph check-typesandbun run --cwd packages/memory-graph testpassed (197 tests).git diff --checkand Black checks passed. Biome found no applicable changed files.Known CI follow-up
.github/workflows/ci-python.ymlpins Supermemory3.16.0and3.59.0, which conflict with this package's v5 requirement. Repository instructions prohibit workflow edits unless explicitly requested, so that matrix remains unchanged in this draft.bun run check-typesfails in untouchedpackages/toolsTypeScript code (AI SDK/Zod type errors). No TypeScript files changed here.