Context
Sub-2 of #10103, graduated from Discussion #11961. This sub owns runtime provider routing and native Ollama wire-up.
The Problem
The config surface advertises provider choices such as ollama and openAiCompatible, but active chat, embedding, and graph-processing callsites are not consistently routed through a split provider contract. That makes cloud deployment configuration appear supported while runtime behavior may still fall back to OpenAI-compatible or Gemini-specific paths.
The Architectural Reality
Primary surfaces:
ai/provider/Ollama.mjs
ai/provider/OpenAiCompatible.mjs
ai/services/memory-core/TextEmbeddingService.mjs
ai/services/memory-core/SessionService.mjs
- Dream / graph-mutator provider reachability gates
This is runtime-provider file-group scope. Tier-1 config key migration belongs to Sub-1; docs/integration readiness belongs to Sub-3.
The Fix
Add or repair provider dispatch so chatProvider and embeddingProvider values route to native Ollama and OpenAI-compatible implementations correctly. Verify whether Neo.ai.provider.Ollama already supports embeddings; add a narrow embeddings method if not.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback / Edge Case |
Docs |
Evidence |
| Chat provider routing |
#11961 OQ2/OQ6 |
chatProvider: 'ollama' routes native Ollama chat where supported |
OpenAI-compatible Ollama endpoint remains fallback profile |
Provider JSDoc |
Unit tests with mocked provider |
| Embedding provider routing |
#11961 OQ2/OQ6 |
embeddingProvider: 'ollama' routes native Ollama embeddings or adds missing method |
If provider lacks embeddings, add explicit method rather than silently falling back |
Provider JSDoc |
Unit tests for embedding dispatch |
| Dream/graph-mutator readiness gate |
#11961 OQ6 |
Provider reachability checks align with selected chat provider |
Manual/operator override path documented if needed |
Service JSDoc |
Focused dream readiness mock |
Decision Record impact
Aligned with the #11961 decision that native Ollama is active, not deprecated.
Acceptance Criteria
Out of Scope
- Tier-1 config key migration.
- Cloud documentation and full integration readiness tests.
- Per-tenant provider variation.
Avoided Traps
- Do not treat native Ollama as speculative just because dispatch is incomplete.
- Do not collapse chat and embeddings back into one vague
modelProvider axis.
Related
- Parent: #10103
- Discussion: #11961
- Sub-1: config ownership ledger + Tier-1 lift
- Sub-3: cloud docs + readiness tests
Handoff Retrieval Hint: "Sub-2 #10103 runtime provider routing native Ollama chat embedding dream readiness"
Context
Sub-2 of #10103, graduated from Discussion #11961. This sub owns runtime provider routing and native Ollama wire-up.
The Problem
The config surface advertises provider choices such as
ollamaandopenAiCompatible, but active chat, embedding, and graph-processing callsites are not consistently routed through a split provider contract. That makes cloud deployment configuration appear supported while runtime behavior may still fall back to OpenAI-compatible or Gemini-specific paths.The Architectural Reality
Primary surfaces:
ai/provider/Ollama.mjsai/provider/OpenAiCompatible.mjsai/services/memory-core/TextEmbeddingService.mjsai/services/memory-core/SessionService.mjsThis is runtime-provider file-group scope. Tier-1 config key migration belongs to Sub-1; docs/integration readiness belongs to Sub-3.
The Fix
Add or repair provider dispatch so
chatProviderandembeddingProvidervalues route to native Ollama and OpenAI-compatible implementations correctly. Verify whetherNeo.ai.provider.Ollamaalready supports embeddings; add a narrow embeddings method if not.Contract Ledger Matrix
chatProvider: 'ollama'routes native Ollama chat where supportedembeddingProvider: 'ollama'routes native Ollama embeddings or adds missing methodDecision Record impact
Aligned with the #11961 decision that native Ollama is active, not deprecated.
Acceptance Criteria
Out of Scope
Avoided Traps
modelProvideraxis.Related
Handoff Retrieval Hint: "Sub-2 #10103 runtime provider routing native Ollama chat embedding dream readiness"