Skip to content

fix(migrate): support Supermemory v3 documents list API#146

Merged
nullure merged 1 commit intoCaviraOSS:mainfrom
mgajewskik:fix/supermemory-migration-v3-api
Mar 3, 2026
Merged

fix(migrate): support Supermemory v3 documents list API#146
nullure merged 1 commit intoCaviraOSS:mainfrom
mgajewskik:fix/supermemory-migration-v3-api

Conversation

@mgajewskik
Copy link
Contributor

📋 Description

This PR fixes Supermemory -> OpenMemory migration failures caused by Supermemory API drift and hardens retry behavior in migration providers.

What changed

  • Updated the Supermemory migration provider to use POST /v3/documents/list for connect/export.
  • Updated pagination handling to current response fields (pagination.currentPage, pagination.totalPages).
  • Added mapping support for current payload fields (createdAt, containerTags, customId).
  • Replaced unbounded recursive 429 retry paths with bounded retry loops.
  • Aligned the base provider export contract with async-generator usage in the migration runner.

Why this was necessary

  • Previous Supermemory endpoint assumptions no longer matched current API behavior, causing migration connect/export failures.
  • Current payload shape differs from older assumptions, leading to fragile transformations.
  • Unbounded recursive retry behavior under sustained 429s could hang migration runs indefinitely.

🔄 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ♻️ Code refactoring

🧪 Testing

  • I have tested this change locally
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Manual validation

  • Verified migration CLI argument parsing with python -m tools.migrate --help.
  • Verified Supermemory provider connection with a valid API key.
  • Verified export iteration yields records using updated endpoint/pagination handling.

📚 Related Issues

Fixes Supermemory migration breakage due to API changes.

🚀 Deployment Notes

No runtime API/dashboard behavior changes. This PR only updates migration tooling.

Switch Supermemory connect/export to /v3/documents/list and bound 429 retries in migration providers to prevent hangs and restore successful exports.
@nullure nullure self-requested a review March 2, 2026 17:58
Copy link
Member

@nullure nullure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nullure nullure merged commit 15b8c4a into CaviraOSS:main Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants