LearnNewsExamplesServices
Frontmatter
id12264
titlelms preload regression: default-enabled lane force-loads an oversized chat model (gemma-4-31b-it @ 262K) on start
stateClosed
labels
bugaiarchitecture
assigneesneo-gpt
createdAtMay 31, 2026, 7:58 PM
updatedAtJun 1, 2026, 2:54 PM
githubUrlhttps://github.com/neomjs/neo/issues/12264
authorneo-opus-ada
commentsCount5
parentIssuenull
subIssues
12285 Restore native Ollama local-provider residency parity
12286 Retune local embedding context defaults for Qwen3 ingestion
subIssuesCompleted2
subIssuesTotal2
blockedBy[]
blocking[]
closedAtJun 1, 2026, 2:54 PM

lms preload regression: default-enabled lane force-loads an oversized chat model (gemma-4-31b-it @ 262K) on start

Closed v13.0.0/archive-v13-0-0-chunk-15 bugaiarchitecture
neo-opus-ada
neo-opus-ada commented on May 31, 2026, 7:58 PM

Problem

The orchestrator's lms (LM Studio CLI) lane is enabled by default (ba5cdee5d set orchestrator.lms.enabled to leaf(true, …)), and its post-spawn readiness hook force-loads the configured chat + embedding models at their tuned context lengths. The chat default is openAiCompatible.model = gemma-4-31b-it at localModels.chat.contextLimitTokens = 262144 — a 31B model at 256K context, which on a typical local-dev host is on the order of tens of GB and likely will not fit (@neo-gpt's runtime read: LM Studio rejects it as ~87GB). So a default orchestrator start attempts a chat preload the host probably cannot serve.

This is the default-enable + aggressive-preload regression — distinct from the restart-loop. #12262 / PR #12263 fix the process-liveness half; after that fix the lane no longer loops, but the orchestrator can still attempt one impossible chat load on start. Surfaced during PR #12263's cross-family review (@neo-gpt).

Verified chain (on dev — config + code, directly inspected)

  • ai/config.template.mjs: orchestrator.lms.enabled: leaf(true, …) (default-on); openAiCompatible.model: 'gemma-4-31b-it'; localModels.chat.contextLimitTokens: 262144; openAiCompatible.embeddingModel: 'text-embedding-qwen3-embedding-8b'.
  • Orchestrator.lmsModels ignores orchestrator.lms.model and forwards openAiCompatible.model + openAiCompatible.embeddingModel as the preload list.
  • TaskDefinitions passes that list into ensureLmsModelsLoaded() (lms postSpawn).
  • ensureLmsModelsLoaded() force-loads context-configured models → the chat entry becomes lms load gemma-4-31b-it --context-length 262144.

Observed (operator runtime, 2026-05-31)

  • The lms lane restart-loop (#12262 / PR #12263 addresses this).
  • A KB sync embedding failure: socket hang up on embedding batch 1 → 5 retries → Synchronization Failed: Failed to process batch 1 after 5 retriesexited with code 1 (VectorService.embedChunks).

Causation NOT yet proven (per @neo-gpt V-B-A + operator challenge)

The KB embedding socket hang up is not proven to be caused by this preload regression or by the #12263 restart storm. Refined by operator logs + @neo-gpt's evidence-correction (comment on this issue):

  • The 17:08 KB sync was a small incremental embed — 26,525 existing docs, 12 chunks to add/update, 1 stale delete. So PR #12162's Chroma rename knowledge-baseunified preserved the store (NOT a migration / full re-embed — that candidate is ruled out).
  • Best current framing: the socket hang up is OpenAI-compatible endpoint (LM Studio) instability during a small incremental embed, correlated with the lms restart-loop churn but not proven to be caused by it.
  • Timeline nuance: the prewarm (#12112, 05-27) predates lms.enabled=true (ba5cdee5d, 05-31 16:49Z); the hangup may predate the default-enable.

If the KB embedding failure reproduces after #12263 stabilizes the lms lane, file a focused KB/provider-readiness follow-up rather than attributing it here.

Acceptance Criteria (outcome-based — scoped to preload safety, NOT the KB hangup)

  1. A default-config orchestrator start on a typical local-dev host does not attempt a chat model load the host cannot serve.
  2. The lms lane preload degrades gracefully: a chat model that cannot be loaded does not break the lane (skip + WARN) and does not leave the embedding model unserviceable.
  3. The default openAiCompatible.model / localModels.chat.contextLimitTokens / orchestrator.lms.enabled values are reconciled by the config SSOT owner for local-dev safety. (Config is SSOT — these values are operator-owned; this AC is the decision record, not a code-baked default.)

Fix levers (implementer + SSOT-owner choice; deliberately not pre-prescribed)

  • Config (operator-owned SSOT): retune the default chat model / chat context / lms.enabled for local-dev safety.
  • Code: make ensureLmsModelsLoaded capacity-aware / non-fatal (skip + WARN when a model+context will not fit) so a too-large default never cascades to lane failure; and/or preload only the embedding model by default with lazy chat-load on first request.

Relationship

  • #12262 / PR #12263 — restart-loop HTTP-probe liveness (necessary-not-sufficient predecessor; this regression surfaced during its review).
  • #12162 — Chroma unified-store rename; the store was preserved (the 17:08 sync was incremental, 12 chunks) — ruled out as a re-embed cause.

Evidence

L2-config (the config + code chain that the default preload targets gemma-4-31b-it @ 262144 is directly verified). The live load-rejection (~87GB) is reported by @neo-gpt from operator runtime but not re-verified here (:1234 unreachable at review time); the KB-embedding causation is explicitly unproven (see above).

tobiu referenced in commit c87dc45 - "feat(orchestrator): recover stale lms maintenance locks (#12264) (#12267) on May 31, 2026, 10:25 PM
tobiu closed this issue on May 31, 2026, 10:25 PM
tobiu referenced in commit 4367e96 - "fix(orchestrator): degrade oversized lms preloads (#12264) (#12274) on Jun 1, 2026, 6:36 AM