mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2164] [Issue]: Knowledge-router semantic shortlist is disabled in refactor (no embeddingSource is threaded in) #1073
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#1073
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?
Originally created by @Romuromylus on GitHub (Jun 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2164
Originally assigned to: @Promansis on GitHub.
Summary
The knowledge router's semantic/embedding shortlist ranks candidate lorebook entries by cosine similarity to the conversation. In the refactor the live knowledge-agent runner calls
executeKnowledgeRouterwithout anembeddingSourceorlocalEmbedder, and the embeddings helper no longer defaults to a local embedder, so the query embedding isnulland the router silently falls back to keyword/activated-entry candidates only.Expected behavior
The knowledge router should embed the conversation query and candidate entries, then shortlist the top-K most semantically similar entries, as legacy did by passing
embeddingSource: memoryRecallEmbeddingSource.Actual behavior
runKnowledgePreGenerationAgentscallsexecuteKnowledgeRouterwith noembeddingSource/localEmbedder(the options block has only activated/keyword entries and scan options).embedQueryreturnsnull,semanticShortlistLorebookEntriesreturnsnull, andprepareKnowledgeRouterCandidatesuses only keyword-scan + activated entries. The fix is available but unwired:generationEmbeddingSource(llm, connection)already exists and is used for memory-recall and active-lorebook scanning, just not threaded into the knowledge runner.Steps to reproduce
Impact area
Environment
93555d4bRegression notes
Worked in legacy (main @
c49f1d95). main:packages/server/src/routes/generate.routes.ts:6406-6427(executeKnowledgeRouter called with embeddingSource). refactor @93555d4b:src/engine/generation/agent-runner.ts:560-573(call has no embeddingSource); compounded bysrc/engine/generation-core/lorebooks/embeddings.ts:39-49(embedQuery dropped the?? localEmbeddefault that legacypackages/server/src/services/lorebook/embeddings.ts:71-76had).generationEmbeddingSource()exists unused for this path atsrc/engine/generation/start-generation.ts:220.