mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #558] [MERGED] Fix Memory Recall embedding fallback #4672
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4672
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/558
Author: @TheLonelyDevil9
Created: 5/8/2026
Status: ✅ Merged
Merged: 5/10/2026
Merged by: @SpicyMarinara
Base:
main← Head:fix/memory-recall-embedding-fallback📝 Commits (2)
90ebd7fFix memory recall embedding fallbackadf46f4Merge remote-tracking branch 'origin/main' into codex-resolve-pr-558📊 Changes
5 files changed (+30 additions, -7 deletions)
View changed files
📝
packages/server/package.json(+1 -1)📝
packages/server/src/services/memory-recall-embedding.ts(+12 -3)📝
packages/server/src/services/memory-recall.ts(+14 -1)📝
packages/server/test/memory-recall.test.ts(+2 -2)➕
packages/server/test/setup-env.ts(+1 -0)📄 Description
What?
Adds a configured embedding-connection fallback for Memory Recall when the local ONNX/HuggingFace embedder is unavailable.
Fixes #435.
Why?
On Android/Termux,
onnxruntime-nodenative bindings may be unavailable, solocalEmbed()returnsnulland Memory Recall chunks remain stuck asWaiting for vector. Users who already configure remote embedding models should be able to use that embedding source instead of losing Memory Recall entirely on unsupported local platforms.How?
Memory Recall now resolves a
MemoryRecallEmbeddingContextfrom the active chat connection, honoring chat-level embedding connection overrides, connection-level embedding connection overrides, embedding base URL overrides, provider default base URLs, and the selected embedding model.The service wraps embedding calls in a local-first helper:
localEmbed()first;embed();Recall now logs a warning if stored chunk vector dimensions differ from the query vector dimensions, which can happen after changing embedding models. Manual refresh remains the path to rebuild chunks under the current embedding model.
Testing?
pnpm --filter @marinara-engine/server exec tsx --import ./test/setup-env.ts --test test/memory-recall.test.tspnpm checkpnpm --filter @marinara-engine/server test(runs the new Memory Recall tests, but the full suite still has three unrelated baseline failures inclaude-subscription-provider.test.tsandlorebook-keeper-utils.test.ts)Screenshots (optional)
Not included. The user-facing UI change is copy-only in the Memory Recall settings help text; no layout or visual behavior changed.
Anything Else?
The fallback can use paid/remote embedding APIs depending on the configured connection, so the settings copy now says Memory Recall uses local embeddings when available and otherwise falls back to the configured embedding connection.
Summary by CodeRabbit
Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.