Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.14.0"
".": "3.15.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 26
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-00c63196a0d368b4f32efcf1bbd2d594fdc8a42a0c0a58a8e316a3ab03ac10a6.yml
openapi_spec_hash: 012afff66351582e55dfd692397f2a23
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-b1d58ccf9003b376f42b961813f18a80e7de4872ed328a846645a7b2a0c68551.yml
openapi_spec_hash: 4750dcce77e6b76b240f058d9ecd06ad
config_hash: a69d5c502ffbfb11a2c8ec61ca5823e9
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 3.15.0 (2026-01-09)

Full Changelog: [v3.14.0...v3.15.0](https://github.com/supermemoryai/python-sdk/compare/v3.14.0...v3.15.0)

### Features

* **api:** api update ([8df190c](https://github.com/supermemoryai/python-sdk/commit/8df190ce72d0340f459ec64e3a8463025e33c3af))


### Documentation

* prominently feature MCP server setup in root SDK readmes ([a1b1bbe](https://github.com/supermemoryai/python-sdk/commit/a1b1bbe66bff136314597e68504a404e2dea68ba))

## 3.14.0 (2026-01-05)

Full Changelog: [v3.13.0...v3.14.0](https://github.com/supermemoryai/python-sdk/compare/v3.13.0...v3.14.0)
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ and offers both synchronous and asynchronous clients powered by [httpx](https://

It is generated with [Stainless](https://www.stainless.com/).

## MCP Server

Use the Supermemory MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=supermemory-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsInN1cGVybWVtb3J5LW1jcCJdfQ)
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22supermemory-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22supermemory-mcp%22%5D%7D)

> Note: You may need to set environment variables in your MCP client.

## Documentation

The REST API documentation can be found on [docs.supermemory.ai](https://docs.supermemory.ai). The full API of this library can be found in [api.md](api.md).
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "supermemory"
version = "3.14.0"
version = "3.15.0"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
10 changes: 10 additions & 0 deletions src/supermemory/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ def profile(
self,
*,
container_tag: str,
threshold: float,
q: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Comment on lines 294 to 300
Copy link

Choose a reason for hiding this comment

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

Bug: The profile method now requires a threshold parameter without a default value. This is a breaking change that will cause existing calls to fail after upgrading.
Severity: CRITICAL

🔍 Detailed Analysis

The profile() method in both the synchronous and asynchronous clients has been updated to require a new threshold parameter without providing a default value. Code that uses an older version of the SDK and calls client.profile(container_tag="...") will fail with a TypeError: profile() missing 1 required keyword-only argument: 'threshold' after upgrading. This breaking change was introduced in a minor version release, which can lead to unexpected runtime failures in production environments for users who follow semantic versioning.

💡 Suggested Fix

To maintain backward compatibility, add a default value to the threshold parameter, for example, threshold: float = 0.0. Alternatively, release this as a major version and clearly document the breaking change and migration steps in the CHANGELOG.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/supermemory/_client.py#L294-L300

Potential issue: The `profile()` method in both the synchronous and asynchronous clients
has been updated to require a new `threshold` parameter without providing a default
value. Code that uses an older version of the SDK and calls
`client.profile(container_tag="...")` will fail with a `TypeError: profile() missing 1
required keyword-only argument: 'threshold'` after upgrading. This breaking change was
introduced in a minor version release, which can lead to unexpected runtime failures in
production environments for users who follow semantic versioning.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8373668

Expand All @@ -309,6 +310,9 @@ def profile(
container_tag: Tag to filter the profile by. This can be an ID for your user, a project ID, or
any other identifier you wish to use to filter memories.

threshold: Threshold for search results. Only results with a score above this threshold
will be included.

q: Optional search query to include search results in the response

extra_headers: Send extra headers
Expand All @@ -324,6 +328,7 @@ def profile(
body=maybe_transform(
{
"container_tag": container_tag,
"threshold": threshold,
"q": q,
},
client_profile_params.ClientProfileParams,
Expand Down Expand Up @@ -592,6 +597,7 @@ async def profile(
self,
*,
container_tag: str,
threshold: float,
q: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -607,6 +613,9 @@ async def profile(
container_tag: Tag to filter the profile by. This can be an ID for your user, a project ID, or
any other identifier you wish to use to filter memories.

threshold: Threshold for search results. Only results with a score above this threshold
will be included.

q: Optional search query to include search results in the response

extra_headers: Send extra headers
Expand All @@ -622,6 +631,7 @@ async def profile(
body=await async_maybe_transform(
{
"container_tag": container_tag,
"threshold": threshold,
"q": q,
},
client_profile_params.ClientProfileParams,
Expand Down
2 changes: 1 addition & 1 deletion src/supermemory/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "supermemory"
__version__ = "3.14.0" # x-release-please-version
__version__ = "3.15.0" # x-release-please-version
6 changes: 6 additions & 0 deletions src/supermemory/types/client_profile_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,11 @@ class ClientProfileParams(TypedDict, total=False):
to use to filter memories.
"""

threshold: Required[float]
"""Threshold for search results.

Only results with a score above this threshold will be included.
"""

q: str
"""Optional search query to include search results in the response"""
8 changes: 8 additions & 0 deletions tests/api_resources/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def test_streaming_response_add(self, client: Supermemory) -> None:
def test_method_profile(self, client: Supermemory) -> None:
client_ = client.profile(
container_tag="containerTag",
threshold=0,
)
assert_matches_type(ProfileResponse, client_, path=["response"])

Expand All @@ -76,6 +77,7 @@ def test_method_profile(self, client: Supermemory) -> None:
def test_method_profile_with_all_params(self, client: Supermemory) -> None:
client_ = client.profile(
container_tag="containerTag",
threshold=0,
q="q",
)
assert_matches_type(ProfileResponse, client_, path=["response"])
Expand All @@ -85,6 +87,7 @@ def test_method_profile_with_all_params(self, client: Supermemory) -> None:
def test_raw_response_profile(self, client: Supermemory) -> None:
response = client.with_raw_response.profile(
container_tag="containerTag",
threshold=0,
)

assert response.is_closed is True
Expand All @@ -97,6 +100,7 @@ def test_raw_response_profile(self, client: Supermemory) -> None:
def test_streaming_response_profile(self, client: Supermemory) -> None:
with client.with_streaming_response.profile(
container_tag="containerTag",
threshold=0,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down Expand Up @@ -163,6 +167,7 @@ async def test_streaming_response_add(self, async_client: AsyncSupermemory) -> N
async def test_method_profile(self, async_client: AsyncSupermemory) -> None:
client = await async_client.profile(
container_tag="containerTag",
threshold=0,
)
assert_matches_type(ProfileResponse, client, path=["response"])

Expand All @@ -171,6 +176,7 @@ async def test_method_profile(self, async_client: AsyncSupermemory) -> None:
async def test_method_profile_with_all_params(self, async_client: AsyncSupermemory) -> None:
client = await async_client.profile(
container_tag="containerTag",
threshold=0,
q="q",
)
assert_matches_type(ProfileResponse, client, path=["response"])
Expand All @@ -180,6 +186,7 @@ async def test_method_profile_with_all_params(self, async_client: AsyncSupermemo
async def test_raw_response_profile(self, async_client: AsyncSupermemory) -> None:
response = await async_client.with_raw_response.profile(
container_tag="containerTag",
threshold=0,
)

assert response.is_closed is True
Expand All @@ -192,6 +199,7 @@ async def test_raw_response_profile(self, async_client: AsyncSupermemory) -> Non
async def test_streaming_response_profile(self, async_client: AsyncSupermemory) -> None:
async with async_client.with_streaming_response.profile(
container_tag="containerTag",
threshold=0,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down