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 — an lms server start task (orchestrator.lms.enabled = leaf(true)) + loadLmsModel(--context-length, --parallel) fed by buildLmsPreloadConfig — 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").
- No
ollama serve ensure task in taskDefinitions.mjs (the supervised set is dev-server / neural-link bridge / mlx / lms / Chroma / embed).
- No model preload with
num_ctx = contextLimitTokens, no keep_alive residency, no parallel/KV budget.
So if modelProvider / graphProvider / embeddingProvider route to native ollama, 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 default num_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)
- Orchestrator task that ensures
ollama serve is running when a role routes to native ollama (gated on an orchestrator.ollama.enabled flag mirroring orchestrator.lms.enabled).
- A preload ensuring the configured model is available + loaded with
num_ctx = contextLimitTokens (the Ollama equivalent of lms load --context-length) + keep_alive resident.
- The same #13851-style readiness enforcement: verify the loaded
num_ctx ≥ configured (+ a sane parallel/KV budget), reload if wrong — not merely "is the server up."
Acceptance Criteria
Out of Scope
- The LM Studio enforcement (#13851). The choke/extraction internals (#12439).
Related
- Sibling of #13851 (LM Studio enforcement). Parent: #13624 (orchestrator). Root: #13750 (golden-path PRIO-zero).
Origin Session ID: e96a0867-4c28-4877-b2f4-f56173ee9fd1
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