mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7627] [MERGED] feat: default embedding model in Connection defaults #7844
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#7844
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/7627
Author: @ylli-selmani
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @ylli-selmani
Base:
staging← Head:feat/default-embedding-model📝 Commits (8)
0da77aafeat(embeddings): app-wide default embedding source in the resolver1111c66Merge branch 'staging' into feat/default-embedding-model106ae6cfeat(connections): Embeddings row in Connection defaults3e9cb13feat(lorebooks): Vectorize picker starts on the default embedding model838842ddocs: default embedding model in Connection defaultsa4592eafix(lorebooks): keep an explicit Vectorize choice over the default58f36dbfix(embeddings): honor chat overrides first and reject unusable defaultsba84242fix: remember "No semantic search" and name Embedding Connection in copy📊 Changes
12 files changed (+445 additions, -53 deletions)
View changed files
📝
docs/agents/memory.md(+3 -1)📝
docs/lorebooks/semantic-search.md(+3 -1)➕
packages/client/src/components/connections/EmbeddingDefaultControl.tsx(+102 -0)📝
packages/client/src/components/lorebooks/LorebookEditor.tsx(+20 -3)📝
packages/client/src/components/panels/ConnectionsPanel.tsx(+2 -0)📝
packages/client/src/hooks/use-connections.ts(+29 -1)📝
packages/client/src/localization/locales/en.json(+7 -0)📝
packages/server/src/routes/app-settings.routes.ts(+32 -0)📝
packages/server/src/services/memory-recall-embedding.ts(+95 -46)📝
packages/server/src/services/storage/connection-reference-cleanup.ts(+8 -1)📝
packages/shared/src/types/connection.ts(+9 -0)➕
scripts/regressions/default-embedding-connection.regression.ts(+135 -0)📄 Description
Requested by Ylli
Linked issue
Closes #7626
Why this change
What changed
Progress, one commit per slice:
docs/lorebooks/semantic-search.md,docs/agents/memory.md, and a[docs-i18n]follow-up issueSlice 1:
default-embedding-connection(DEFAULT_EMBEDDING_CONNECTION_SETTINGS_KEY) holding a connection id or the local sidecar id. No schema change.resolveMemoryRecallEmbeddingSourceuses it only when the chat sets no embedding override and the connection sets neither an embedding model nor an Embedding Connection, or when there is no connection at all. Every existing caller (Memory Recall, Advanced Memory, chat summary retrieval, lorebook semantic matching, the Long-term memory capability host, Professor Mari's check, the raw embed route) picks it up without changes.GET/PUT /api/app-settings/default-embedding-connectionchecks the id, resets the vectorizer availability cache, and goes throughwithLongTermMemoryEmbeddingChangeso Long-term memory re-indexes when the effective source changes.connection-reference-cleanup.ts).createLocalSidecarEmbeddingSource()so the default and the per-connection path share it.Slice 2:
EmbeddingDefaultControlsits between Audio and the Decision model, styled like the Decision picker. It lists connections with an embedding model, plus the local sidecar once its model is downloaded. None (built-in local model) keeps today's behavior.Slice 3:
Slice 4:
docs/lorebooks/semantic-search.mdanddocs/agents/memory.mddescribe the default, precedence, and the picker.Design note: Decision and the other purpose defaults use a flag on the connection row plus an app setting for local entries. Embeddings use a single app setting for both, because it needs no new column and one value can only ever name one source.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdLocal results:
pnpm checkexit 0 after every slice (the one lint warning,serverRunin an unrelated hook, is already onstaging).pnpm localization:checkclean. New regressiondefault-embedding-connectionpasses. Related regressions pass:memory-recall-revectorize,capability-embedding-input-type,lorebook-vectorization,semantic-summary-settings,prompt,mari-permissions-mode,feature-settings,chat-window-default*,capability-package-lifecycle.Local CodeRabbit: slice 1, 0 findings. Slices 1 and 2, 1 finding, on the help text being long and jargon-heavy: shortened it, but kept "Re-vectorize" because that is the button's name in the lorebook panel. Slices 3 and 4, 1 finding: picking No semantic search snapped the picker back to the default. Fixed in
a4592ea52and verified in the browser.GitHub CodeRabbit, 2 findings, both fixed in
58f36dbc7and answered in their threads: a chat's embedding override now comes before the default when there is no usable connection or the random pool is empty, and saving a default refuses a connection with no embedding source of its own. A second round had 2 minor findings, fixed inba8424288and answered in their threads: an explicit No semantic search is now remembered across visits (verified in the browser after a reload), and the help text and guide now name the Embedding Connection override before the default.Checked in a browser against the worktree server (dark theme, 1400px wide): saving the default through the row (and the server returns 400 for an unknown id; the "no embedding model" refusal is covered by code review only); the count line; the lorebook picker preselecting the default; a remembered choice winning over it; and picking No semantic search staying put.
Not verified: light theme, mobile width, the local sidecar option (no sidecar model on the test machine), and a real embedding request through the default.
Manual verification notes
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
Screenshots of the Embeddings row and the preselected lorebook picker exist locally and are not uploaded.
🤖 Generated with Claude Code
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.