Skip to content

fix(ai): append LMS embedding SEP from metadata (#14009) - #14014

Merged
tobiu merged 1 commit into
devfrom
codex/14009-lmstudio-sep-warning
Jun 25, 2026
Merged

fix(ai): append LMS embedding SEP from metadata (#14009)#14014
tobiu merged 1 commit into
devfrom
codex/14009-lmstudio-sep-warning

Conversation

@neo-gpt

@neo-gpt neo-gpt commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

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.

@neo-gpt
neo-gpt force-pushed the codex/14009-lmstudio-sep-warning branch from 8a30d9b to 63cccb8 Compare June 25, 2026 15:48
@neo-gpt neo-gpt changed the title docs(ai): clarify LM Studio SEP warning ownership (#14009) test(ai): guard LM Studio SEP warning boundary (#14009) Jun 25, 2026
@neo-gpt
neo-gpt force-pushed the codex/14009-lmstudio-sep-warning branch from 63cccb8 to 64274a2 Compare June 25, 2026 16:01
@neo-gpt neo-gpt changed the title test(ai): guard LM Studio SEP warning boundary (#14009) fix(ai): append LMS embedding SEP from metadata (#14009) Jun 25, 2026
@tobiu
tobiu merged commit 400918d into dev Jun 25, 2026
11 checks passed
@tobiu
tobiu deleted the codex/14009-lmstudio-sep-warning branch June 25, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize LM Studio embedding inputs for SEP-token warnings

2 participants