Frontmatter
| title | fix(ai): derive LMS embedding suffix from GGUF metadata (#14015) |
| author | neo-gpt |
| state | Merged |
| createdAt | Jun 25, 2026, 8:36 PM |
| updatedAt | Jun 25, 2026, 11:03 PM |
| closedAt | Jun 25, 2026, 11:03 PM |
| mergedAt | Jun 25, 2026, 11:03 PM |
| branches | dev ← codex/14015-lms-gguf-sep-metadata |
| url | https://github.com/neomjs/neo/pull/14016 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
Merged

neo-gpt
commented on Jun 25, 2026, 8:54 PM
Fresh operator log evidence confirms the current root cause rather than clearing it: live request bodies can visibly end with <|im_end|> and LM Studio still emits last token ... is not SEP once per embedded string.
Same-turn local falsifier on the loaded Qwen3 embedding GGUF:
tokenizer.ggml.eos_token_id=151643-><|endoftext|>tokenizer.ggml.eot_token_id=151645-><|im_end|>tokenizer.ggml.add_eos_token=true
So <|im_end|> is the chat EOT token for this GGUF, not the EOS/SEP token LMS is warning about. The #14016 branch remains the intended fix: append the metadata-derived GGUF EOS suffix (<|endoftext|> here) at the LMS request boundary, after any existing <|im_end|> content.

tobiu
APPROVED reviewed on Jun 25, 2026, 11:02 PM
No review body provided.
Resolves #14015
Derives the LM Studio embedding request suffix from the loaded GGUF tokenizer metadata instead of mapping Qwen3 to the chat EOT token.
TextEmbeddingServicenow appends the GGUF EOS token text (<|endoftext|>for the installed Qwen3 embedding GGUF), and the provider-readiness canary can apply the same metadata-derived suffix when LMS metadata is present. Generic OpenAI-compatible and unknown-metadata paths remain unchanged.Evidence: L3 (live
lms ps --json+ local GGUF header probe showedeos_token_id -> <|endoftext|>and service-level fake-endpoint request capture sent that token) -> L3 required (runtime request-boundary correctness). Residual: post-merge operator log confirmation that LMS warnings stop during repair-defrag.Deltas from ticket
The first #14015 body focused on a canary bypass. Live logs then showed the real repair-defrag batch already ended with
<|im_end|>and still warned, so the implementation pivoted to the stronger root cause:<|im_end|>iseot_token_id, not this GGUF's EOS/SEP token.Test Evidence
node --input-type=module -e '...'live helper probe against/Users/tobiasuhlig/.lmstudio/models/Qwen/Qwen3-Embedding-8B-GGUF/Qwen3-Embedding-8B-Q4_K_M.gguf-> suffix<|endoftext|>.node --input-type=module -e '...'service-path probe with actuallms psmetadata + fake endpoint -> request inputhello<|endoftext|>andworld<|im_end|><|endoftext|>.npm run test-unit -- test/playwright/unit/ai/services/memory-core/TextEmbeddingService.retry.spec.mjs test/playwright/unit/ai/scripts/runners/runSandman.spec.mjs-> 87 passed.git diff --checkandgit diff --cached --checkpassed.Post-Merge Validation
devand confirm LM Studio no longer emits the SEP warning for Memory Core re-embed batches.Authored by Euclid (GPT-5, Codex Desktop). Session 9280140f-8b54-4462-9342-49cca7e226f4.