Frontmatter
| id | 13852 |
| title | fix(ai): orchestrator has no Ollama serving lifecycle — no `ollama serve` ensure + no `num_ctx` preload (native-Ollama hits #13851''s context-starvation with zero handling) |
| state | Closed |
| labels | bugaiarchitecture |
| assignees | neo-gpt, neo-opus-grace |
| createdAt | Jun 22, 2026, 5:28 AM |
| updatedAt | 3:20 PM |
| githubUrl | https://github.com/neomjs/neo/issues/13852 |
| author | neo-opus-grace |
| commentsCount | 6 |
| parentIssue | 13624 |
| subIssues | 13862 Cap local-model Ollama serving envelope in compose 13865 Native Ollama readiness enforces loaded context 13867 Supervise native Ollama serve lifecycle in Orchestrator |
| subIssuesCompleted | 3 |
| subIssuesTotal | 3 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jun 24, 2026, 6:22 PM |
fix(ai): orchestrator has no Ollama serving lifecycle — no ollama serve ensure + no num_ctx preload (native-Ollama hits #13851's context-starvation with zero handling)

tobiu
Jun 24, 2026, 6:22 PM
not code ready for an epic in disguise with 3 resolved subs. disagreed. resolved.
- 2026-07-02T01:31:37Z @neo-opus-grace cross-referenced by #14418
Context (sibling of #13851)
#13851 found the no-digestion / golden-path-starvation root: the extraction model loaded at the wrong context window. For LM Studio (
openAiCompatible) the orchestrator already HAS the serving lifecycle — anlms server starttask (orchestrator.lms.enabled = leaf(true)) +loadLmsModel(--context-length, --parallel)fed bybuildLmsPreloadConfig— so #13851 is "enforce the already-correct config."For native Ollama there is no equivalent lifecycle at all:
buildLmsPreloadConfig(providerReadinessHelper.mjs:297) is LM-Studio-only — it explicitly excludes Ollama-routed roles ("never infer activity from non-null model leaves… only includes roles whose selector targets the OpenAI-compatible surface that LM Studio serves").ollama serveensure task intaskDefinitions.mjs(the supervised set is dev-server / neural-link bridge / mlx / lms / Chroma / embed).num_ctx = contextLimitTokens, nokeep_aliveresidency, no parallel/KV budget.So if
modelProvider/graphProvider/embeddingProviderroute to nativeollama, the orchestrator does not start the Ollama server, does not preload the model at the configured context, and does not enforce it — Ollama hits the same context-default starvation as #13851 (Ollama defaultnum_ctx≈ 2048-4096) with zero orchestrator handling. The config already carries Ollama settings (ollama.keep_alive = -1,ollama.requireParallelModels = 2,ai/config.mjs:167-168) — they're just not consumed by any serving lifecycle.The Fix (Ollama parity with the LM Studio lifecycle)
ollama serveis running when a role routes to native ollama (gated on anorchestrator.ollama.enabledflag mirroringorchestrator.lms.enabled).num_ctx = contextLimitTokens(the Ollama equivalent oflms load --context-length) +keep_aliveresident.num_ctx≥ configured (+ a sane parallel/KV budget), reload if wrong — not merely "is the server up."Acceptance Criteria
ollama serve(when a role targets native ollama), gated on an enable flag.num_ctx = contextLimitTokens+keep_aliveresident.num_ctx≥ configured; reloads if insufficient (parity with #13851).buildOllamaPreloadConfig(or a unified provider-preload abstraction) consuming the role selectors, mirroringbuildLmsPreloadConfig.Out of Scope
Related
Origin Session ID: e96a0867-4c28-4877-b2f4-f56173ee9fd1