Skip to content

fix(supermemory): honor options.limit in search() instead of hardcoding 30 - #56

Merged
sohamd22 merged 1 commit into
supermemoryai:mainfrom
dkoosis:upstream-pr/supermemory-limit
Aug 24, 2026
Merged

fix(supermemory): honor options.limit in search() instead of hardcoding 30#56
sohamd22 merged 1 commit into
supermemoryai:mainfrom
dkoosis:upstream-pr/supermemory-limit

Conversation

@dkoosis

@dkoosis dkoosis commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Problem

SupermemoryProvider.search() hardcodes limit: 30, silently overriding whatever limit the caller passes in SearchOptions — a consumer requesting a deeper retrieval pool still caps at 30.

Fix

Honor options.limit, keeping 30 as the default:

limit: options.limit ?? 30,

SearchOptions.limit already exists in src/types/provider.ts, so no type changes, and callers that don't pass limit see identical behavior. Typechecks clean.

Flagged by @sohamd22 in #44 review. #57 is stacked on this branch.

…ng 30

search() hardcoded limit: 30, silently overriding whatever limit the caller
passed in SearchOptions — so a benchmark requesting a deeper retrieval pool
(e.g. limit 50) still capped at 30. Honor options.limit, keeping 30 as the
default. Flagged by @sohamd22 in PR supermemoryai#44 review.
@sohamd22
sohamd22 merged commit 94e2af5 into supermemoryai:main Aug 24, 2026
2 checks passed

Copy link
Copy Markdown
Collaborator

Appreciate it! Merged :)

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