mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8667] [MERGED] feat(connections): test an embedding model from the model editor #8734
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#8734
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/8667
Author: @SpicyMarinara
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/test-embedding-8663📝 Commits (4)
e9cc952feat(connections): test an embedding model from the model editor (#8663)80da41dfix(connections): clear the embedding test result when its settings change9de46f6fix(connections): any manual edit hides the embedding test resultee9fcd3fix(connections): Test embedding names a missing endpoint, not a missing model📊 Changes
10 files changed (+408 additions, -41 deletions)
View changed files
📝
docs/lorebooks/semantic-search.md(+12 -10)➕
e2e/connection-test-embedding.e2e.ts(+99 -0)📝
packages/client/src/components/connections/ConnectionEditor.tsx(+76 -0)📝
packages/client/src/components/connections/ModelPicker.tsx(+3 -2)📝
packages/client/src/hooks/use-connections.ts(+15 -0)📝
packages/client/src/localization/locales/en.json(+2 -0)📝
packages/server/src/routes/connections.routes.ts(+30 -27)📝
packages/server/src/services/memory-recall-embedding.ts(+20 -2)📝
packages/server/src/services/memory-recall.ts(+3 -0)➕
scripts/regressions/connection-test-embedding.regression.ts(+148 -0)📄 Description
Linked issue
Closes #8663
Why this change
POST /api/connections/:id/test-embeddingroute (used by the Embeddings job picker) sent the call to the connection's chat Base URL with its own model. It ignored the Embedding endpoint URL and the Embedding provider, so it could pass while real semantic search failed, or fail while it worked.What changed
memory-recall-embedding.ts: newresolveConnectionTestEmbeddingSource(db, connection), a thin wrapper around the resolver semantic search already uses. It skips the app-wide Embeddings default, so a connection with nothing set reports "No embedding model set." instead of quietly testing the default. A model with no address to send it to reports "No embedding endpoint set." (found by Dottore). It also lets the provider's error through so the test can show it. Normal semantic search still logs and returns nothing, as before. The resolved source now carriesmodelandendpoint.connections.routes.ts: the route resolves that source, embeds one short fixed text and returns{ success, message, latencyMs, dimensions?, model?, endpoint? }.successandmessagekeep their old meaning, so the job picker works as before. Failures are logged with Pino and name the connection and model, never the key. If the built-in model is picked as the Embedding provider but can't embed, the test says so.useTestEmbeddingmutation inuse-connections.ts.ModelPicker.tsxuses it instead of calling the API directly.ConnectionEditor.tsx: a Test embedding button at the end of the "Semantic search (embeddings)" section (Advanced, then More). It saves edits first, like the other test buttons, and shows the result in the same card, e.g. "Success · 1536 dimensions · 210 ms" or the provider's error. It is disabled while running and when no model would be found.en.json.docs/lorebooks/semantic-search.mdgets a paragraph about Test embedding. Its labels are updated to the current UI: Embedding provider, Same as this provider, Semantic search (embeddings) under Advanced → More, and Built-in model.scripts/regressions/connection-test-embedding.regression.ts. It runs against a local HTTP stub and checks four things: the call goes to the Embedding endpoint URL; the Embedding provider's model, key and URL are used; nothing set gives a plain error; and the key is never echoed. It fails on the old route, where the call went to/chat/v1/embeddings.e2e/connection-test-embedding.e2e.ts: the button is disabled until a model is typed, then success with the vector size, then a failing endpoint shows the provider's error, with no horizontal scroll. It fails without the client change, and also with the client change but the old server route.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
What the agent ran locally:
node ./scripts/pnpm-runner.mjs checkpasses, and so docheck:e2e-typesandlocalization:check.markDirty) now hides the result, and in-flight tests were already discarded there. The e2e checks it. The third pass reported 0 findings.For a human to verify:
text-embedding-3-small). Click Test embedding and check that the card shows Success with 1536 dimensions and the latency.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/lorebooks/semantic-search.mdchanged. The translated packs ondocs-i18nwill be updated in a follow-up docs-i18n PR after this merges.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.