Skip to content

supermemory-openai-sdk fails to import with the latest supermemory (3.50) #1235

Description

@Cintu07

Hit this trying to use the openai SDK package. A fresh install pulls supermemory 3.50.0 (pyproject just says supermemory>=3.1.0) and then importing it blows up right away:

pip install supermemory-openai-sdk
python -c "import supermemory_openai"

ImportError: cannot import name 'MemoryAddResponse' from 'supermemory.types'

Looks like supermemory 3.x renamed a bunch of stuff. MemoryAddResponse and MemoryGetResponse aren't in supermemory.types anymore (it's AddResponse, DocumentGetResponse etc now), and tools.py imports them at module top so the whole package won't import.

Even after fixing the imports, add_memory() calls client.memories.add(...) which is also gone in 3.50. client.memories only has forget and update_memory now, and add moved to the top level (client.add(...)).

It works inside the repo because uv.lock pins an older supermemory, but anyone doing a plain pip install from PyPI hits the import error immediately.

Happy to send a PR for this. I'd swap the imports to the new names and point add_memory at the new API, or just cap the supermemory version if you'd rather do the migration yourselves. MemoryObject is exported in init.py so I didn't want to touch that without checking. Let me know which way you want it and I'll take it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions