Severity: medium (feature unusable self-hosted; falls back silently)
Environment
|
|
| Supermemory Server |
0.0.5 (self-hosted, official installer) |
| Runtime |
Bun v1.3.4 (5eb2145b), Linux x64 |
| Deployment |
Docker (debian:bookworm-slim), single container, docker compose |
| Host |
Windows 11 + Docker Desktop, 8 GB RAM available to the engine |
| Embeddings |
local, Xenova/bge-base-en-v1.5, 768d, native backend |
| Endpoints used |
/v4/search |
Summary
Passing rerank: true to /v4/search throws on the self-hosted server because
the reranker calls a Cloudflare Workers AI binding (env.AI.run) that only
exists in the Workers runtime. Outside Workers the binding is undefined, so
every rerank attempt throws and the search silently returns unranked results.
Steps to reproduce
- Self-host
0.0.5.
POST /v4/search with { "q": "...", "searchMode": "memories", "rerank": true }.
- Observe the error in the server log on every call.
Expected
Either rerank works self-hosted, or the server no-ops it with a clear signal
(the binary already contains a sibling code path that checks the binding and
returns skipped: "missing_ai_binding" — the reranker path lacks that guard).
Actual
Reranking failed: TypeError: undefined is not an object (evaluating 'b.AI.run')
The hardcoded model is @cf/baai/bge-reranker-base, a Workers-AI-only model.
Impact
Rerank is entirely unavailable self-hosted, and the failure is only visible in
logs — callers think they got reranked results. Noisy logs, silent quality loss.
Workaround
Do not pass rerank: true when self-hosted.
Suggested fix
Guard the reranker path with the same missing_ai_binding check the sibling path
already uses, or provide a local reranker for self-hosted deployments.
Found while building a hackathon project on Supermemory Local. Happy to provide
the full crash log, container config, or a minimal repro on request.
Severity: medium (feature unusable self-hosted; falls back silently)
Environment
0.0.5(self-hosted, official installer)v1.3.4(5eb2145b), Linux x64debian:bookworm-slim), single container,docker composeXenova/bge-base-en-v1.5, 768d, native backend/v4/searchSummary
Passing
rerank: trueto/v4/searchthrows on the self-hosted server becausethe reranker calls a Cloudflare Workers AI binding (
env.AI.run) that onlyexists in the Workers runtime. Outside Workers the binding is
undefined, soevery rerank attempt throws and the search silently returns unranked results.
Steps to reproduce
0.0.5.POST /v4/searchwith{ "q": "...", "searchMode": "memories", "rerank": true }.Expected
Either rerank works self-hosted, or the server no-ops it with a clear signal
(the binary already contains a sibling code path that checks the binding and
returns
skipped: "missing_ai_binding"— the reranker path lacks that guard).Actual
The hardcoded model is
@cf/baai/bge-reranker-base, a Workers-AI-only model.Impact
Rerank is entirely unavailable self-hosted, and the failure is only visible in
logs — callers think they got reranked results. Noisy logs, silent quality loss.
Workaround
Do not pass
rerank: truewhen self-hosted.Suggested fix
Guard the reranker path with the same
missing_ai_bindingcheck the sibling pathalready uses, or provide a local reranker for self-hosted deployments.
Found while building a hackathon project on Supermemory Local. Happy to provide
the full crash log, container config, or a minimal repro on request.