Context
Operator reported a P0 regression while running npm run ai:run-sandman manually on May 26, 2026. The run initialized Memory Core, found undigested sessions, successfully ran deterministic Memory/Session graph ingestion for the first session, then failed during Tri-Vector extraction:
buildGraphProvider: unsupported modelProvider 'gemini'. Expected one of: 'ollama', 'openAiCompatible'.
The operator also observed that the resulting handoff file is incomplete and stated the Sandman/Dream pipeline should never use Gemini for this path.
The Problem
The closed provider-routing work in #11965 deliberately made graph dispatch support ollama and openAiCompatible, and providerDispatch.mjs correctly rejects gemini rather than silently falling back. However, Sandman/Dream graph call sites still read the generic Memory Core modelProvider value. The Tier-1 default remains gemini, so manual Sandman can crash before completing semantic extraction and Golden Path handoff generation.
This is not a request to add Gemini support to graph dispatch. The regression is that the Sandman/Dream graph-generation path is using the wrong provider axis.
The Architectural Reality
ai/config.mjs:70 and ai/config.mjs:79 default chatProvider / modelProvider to gemini.
ai/services/graph/providerDispatch.mjs:19 documents graph dispatch support as ollama or openAiCompatible; providerDispatch.mjs:51-55 throws for unsupported providers.
ai/services/graph/SemanticGraphExtractor.mjs:96-100 passes aiConfig.modelProvider into buildGraphProvider().
ai/services/graph/TopologyInferenceEngine.mjs:57-61 does the same for topology extraction.
ai/services/graph/GoldenPathSynthesizer.mjs also instantiates graph provider dispatch from aiConfig.modelProvider.
learn/agentos/DreamPipeline.md:321 already documents the Dream extraction provider default as openAiCompatible, so current code and docs disagree.
- Related closed authority: #11965 AC included "Dream/REM graph-mutator provider reachability is not hardwired to the wrong provider family." PR #11966 implemented provider dispatch and tests that
gemini is unsupported for graph dispatch.
The Fix
Introduce or reuse a graph-generation provider selector that defaults Sandman/Dream graph work to openAiCompatible, while preserving explicit ollama support and explicit failure for unknown provider names.
The fix should update all graph-generation call sites consistently:
SemanticGraphExtractor.executeTriVectorExtraction()
SemanticGraphExtractor.extractMessageConcepts()
TopologyInferenceEngine.extractTopology()
GoldenPathSynthesizer.synthesizeGoldenPath()
Manual Sandman should probe and use the same provider axis it will later dispatch through. It must not claim OpenAI-compatible readiness while the graph dispatch path still points at gemini.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
| Sandman/Dream graph provider selector |
#11965 graph dispatch contract + operator P0 reproducer |
Graph-generation call sites use openAiCompatible by default, or ollama when explicitly configured for graph work |
Unknown values fail before partial handoff generation |
DreamPipeline.md and config JSDoc |
Unit test with modelProvider: 'gemini' and graph provider default |
Manual ai:run-sandman readiness gate |
Operator P0 reproducer |
Readiness probe checks the provider family that graph dispatch will use |
Unsupported graph provider exits with a clear diagnostic before REM mutation |
runner JSDoc/log message |
Unit test for provider mismatch diagnostic |
| Handoff integrity |
sandman_handoff.md consumer contract |
A provider-axis mismatch must not produce a misleading "complete" Sandman run or incomplete handoff without a failure state |
Preserve existing heavy-maintenance lease and graph-decay safeguards |
PR body |
Focused runner/DreamService tests |
Decision Record impact
Aligned with ADR 0015 graph-store backend posture and with #11965 provider-routing closure. No ADR amendment expected.
Acceptance Criteria
Out of Scope
- Adding Gemini support to
providerDispatch.mjs.
- Changing embedding provider defaults.
- Reworking all Tier-1 provider key migration.
- Running destructive or broad Sandman cycles against production Memory Core without explicit operator direction.
Related
- Parent provider-routing work: #11965 / PR #11966
- Parent config epic: #10103
- Dream pipeline docs:
learn/agentos/DreamPipeline.md
Origin Session ID: d84ad2f1-c71c-4ce4-bec7-1167b9183637
Handoff Retrieval Hint: query_raw_memories("runSandman unsupported modelProvider gemini DreamService SemanticGraphExtractor providerDispatch")
Context
Operator reported a P0 regression while running
npm run ai:run-sandmanmanually on May 26, 2026. The run initialized Memory Core, found undigested sessions, successfully ran deterministic Memory/Session graph ingestion for the first session, then failed during Tri-Vector extraction:The operator also observed that the resulting handoff file is incomplete and stated the Sandman/Dream pipeline should never use Gemini for this path.
The Problem
The closed provider-routing work in #11965 deliberately made graph dispatch support
ollamaandopenAiCompatible, andproviderDispatch.mjscorrectly rejectsgeminirather than silently falling back. However, Sandman/Dream graph call sites still read the generic Memory CoremodelProvidervalue. The Tier-1 default remainsgemini, so manual Sandman can crash before completing semantic extraction and Golden Path handoff generation.This is not a request to add Gemini support to graph dispatch. The regression is that the Sandman/Dream graph-generation path is using the wrong provider axis.
The Architectural Reality
ai/config.mjs:70andai/config.mjs:79defaultchatProvider/modelProvidertogemini.ai/services/graph/providerDispatch.mjs:19documents graph dispatch support asollamaoropenAiCompatible;providerDispatch.mjs:51-55throws for unsupported providers.ai/services/graph/SemanticGraphExtractor.mjs:96-100passesaiConfig.modelProviderintobuildGraphProvider().ai/services/graph/TopologyInferenceEngine.mjs:57-61does the same for topology extraction.ai/services/graph/GoldenPathSynthesizer.mjsalso instantiates graph provider dispatch fromaiConfig.modelProvider.learn/agentos/DreamPipeline.md:321already documents the Dream extraction provider default asopenAiCompatible, so current code and docs disagree.geminiis unsupported for graph dispatch.The Fix
Introduce or reuse a graph-generation provider selector that defaults Sandman/Dream graph work to
openAiCompatible, while preserving explicitollamasupport and explicit failure for unknown provider names.The fix should update all graph-generation call sites consistently:
SemanticGraphExtractor.executeTriVectorExtraction()SemanticGraphExtractor.extractMessageConcepts()TopologyInferenceEngine.extractTopology()GoldenPathSynthesizer.synthesizeGoldenPath()Manual Sandman should probe and use the same provider axis it will later dispatch through. It must not claim OpenAI-compatible readiness while the graph dispatch path still points at
gemini.Contract Ledger Matrix
openAiCompatibleby default, orollamawhen explicitly configured for graph workDreamPipeline.mdand config JSDocmodelProvider: 'gemini'and graph provider defaultai:run-sandmanreadiness gatesandman_handoff.mdconsumer contractDecision Record impact
Aligned with ADR 0015 graph-store backend posture and with #11965 provider-routing closure. No ADR amendment expected.
Acceptance Criteria
npm run ai:run-sandmanno longer routes graph extraction throughgeminiwhen no graph-specific provider is configured.modelProviderdirectly.ollamagraph routing remains supported.modelProvider: 'gemini'with no graph override routes graph work toopenAiCompatible, not togemini.ai:run-sandmanmay be skipped if it would mutate live Memory Core, but the reason must be documented.Out of Scope
providerDispatch.mjs.Related
learn/agentos/DreamPipeline.mdOrigin Session ID: d84ad2f1-c71c-4ce4-bec7-1167b9183637
Handoff Retrieval Hint:
query_raw_memories("runSandman unsupported modelProvider gemini DreamService SemanticGraphExtractor providerDispatch")