LearnNewsExamplesServices
Frontmatter
titlefix(ai): append LMS embedding SEP from metadata (#14009)
authorneo-gpt
stateMerged
createdAtJun 25, 2026, 5:44 PM
updatedAtJun 25, 2026, 6:09 PM
closedAtJun 25, 2026, 6:09 PM
mergedAtJun 25, 2026, 6:09 PM
branchesdevcodex/14009-lmstudio-sep-warning
urlhttps://github.com/neomjs/neo/pull/14014
contentTrust
projected
quarantined0
signals[]
Merged
neo-gpt
neo-gpt commented on Jun 25, 2026, 5:44 PM

Resolves #14009

Related: #13999

Fixes the actual LM Studio warning path. TextEmbeddingService now preserves LMS loaded-model metadata from lms ps --json and, only when the active OpenAI-compatible endpoint is the orchestrator-owned LMS lane and the resident embedding model metadata identifies GGUF/Qwen3, appends <|im_end|> to the outbound embedding request strings. Stored Memory Core / KB text is not mutated, and generic OpenAI-compatible or Ollama-compatible endpoints do not receive the LMS/Qwen suffix.

Evidence: L2 unit/preflight evidence covers the request boundary; live local LMS metadata was also checked and shows format: gguf, architecture: qwen3, and embeddingModel: text-embedding-qwen3-embedding-8b on the configured LMS port. I did not add another live embedding request while LMS reported queued work.

Deltas from ticket

The first version of this PR was wrong: it documented or tested around the warning instead of satisfying LMS. This revision implements the ticket goal directly by making Neo send strings whose final token resolves to the LMS-required Qwen3 separator on the LMS metadata path. The earlier cloud DeploymentCookbook note is gone; cloud deployments do not use macOS lms.

Test Evidence

  • npm run test-unit -- test/playwright/unit/ai/services/memory-core/TextEmbeddingService.retry.spec.mjs test/playwright/unit/ai/scripts/runners/runSandman.spec.mjs — 85 passed
  • npm run agent-preflight -- ai/services/graph/providerReadinessHelper.mjs ai/services/memory-core/TextEmbeddingService.mjs test/playwright/unit/ai/services/memory-core/TextEmbeddingService.retry.spec.mjs test/playwright/unit/ai/scripts/runners/runSandman.spec.mjs
  • git diff --check
  • Local LMS/config sanity: configured host http://127.0.0.1:1234, orchestrator.lms.enabled=true, LMS port 1234; lms ps --json exposes format: gguf, architecture: qwen3.

Post-Merge Validation

  • Restart the affected local Agent OS process and confirm new LMS embedding requests no longer emit tokenizer.ggml.add_eos_token should be set to true.

Commits

  • 64274a27d2fix(ai): append LMS embedding SEP from metadata (#14009)

Authored by Euclid (GPT-5 Codex, Codex Desktop). Session 9280140f-8b54-4462-9342-49cca7e226f4.

tobiu
tobiu APPROVED reviewed on Jun 25, 2026, 6:08 PM

No review body provided.