Context
This leaf exists because #13854 is intentionally broader than the repo-local change already ready to ship. The parent ticket also contains #13853-dependent reasoningEffort work and a cloud benchmark, so a PR that only changes native Ollama defaults / structured-output payload shape must not use #13854 as its close target.
Release classification: post-release (repo-local provider parity slice; not release-blocking).
Live latest-open sweep: checked latest 20 open issues at 2026-06-22T10:31:31Z. Closest related tickets were #13854 (broader Ollama/cloud parity parent), #13853 (OpenAI-compatible / LM Studio reasoning-effort sibling), and #13852 (Ollama serving lifecycle). No equivalent closeable leaf for native Ollama format schema passthrough + gemma4:26b default was present.
A2A in-flight claim sweep: checked latest 30 A2A messages at 2026-06-22T10:31:31Z; only overlapping claim was @neo-gpt's own [lane-claim][#13854] Ollama MoE default + native format schema slice.
The Problem
Native Ollama dispatch still defaults NEO_OLLAMA_MODEL / aiConfig.ollama.model to the dense gemma4:31b model while Ollama publishes the 26B A4B MoE under the registry tag gemma4:26b. The provider also only maps JSON-output intent to format: "json"; callers that can provide a JSON schema have no native Ollama format: <schema> path and schema hints leak into payload.options instead of the top-level /api/chat request.
The Architectural Reality
ai/config.template.mjs is the canonical Tier-1 config template. ADR 0019 requires preserving the leaf(default, env, type) SSOT shape instead of adding parallel env parsing.
test/playwright/fixtures/aiConfigDefaults.mjs and test/playwright/unit/ai/config.template.spec.mjs mirror the Tier-1 defaults for deterministic assertions.
ai/provider/Ollama.mjs owns native Ollama /api/chat payload construction. Ollama's documented API accepts format as either "json" or a JSON schema object, and accepts think as a top-level request field for supported models.
test/playwright/unit/ai/provider/KeepAlive.spec.mjs already covers native provider payload shape without requiring a live daemon.
The Fix
- Change the native Ollama chat-model default from
gemma4:31b to gemma4:26b while keeping NEO_OLLAMA_MODEL as the override leaf.
- Normalize provider-neutral schema hints into native Ollama top-level
format:
responseSchema / response_schema -> schema object;
- OpenAI-compatible
response_format: {type: "json_schema"} -> nested schema object;
- OpenAI-compatible
response_format: {type: "json_object"} and JSON mime hints -> "json".
- Promote explicit caller-provided
think to the native top-level field without inventing a reasoningEffort mapping before #13853 lands.
- Add hermetic unit tests plus an env-gated live Ollama probe that is skipped when
NEO_TEST_SKIP_CI is set and only runs when NEO_RUN_LIVE_OLLAMA_TESTS=1 is provided.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
aiConfig.ollama.model |
ADR 0019 + ai/config.template.mjs leaf |
default gemma4:26b; env override remains NEO_OLLAMA_MODEL |
operator keeps current env override |
config JSDoc + config spec |
L1/L2 config spec |
Ollama.preparePayload() structured output |
Ollama /api/chat native format field |
schema hints become top-level payload.format |
legacy format: "json" for plain JSON |
method JSDoc |
L2 provider payload specs |
Ollama.preparePayload() think passthrough |
Ollama /api/chat native request field |
explicit think option becomes top-level payload.think |
no field emitted when caller omits it |
method JSDoc |
L2 provider payload specs |
| Live Ollama verification |
operator-local Ollama daemon |
opt-in env-gated test probes real /api/chat schema behavior |
skipped in CI / normal runs |
test title + skip reason |
L3 when operator runs with model pulled |
Decision Record impact
aligned-with ADR 0019. The change updates the existing config leaf default and does not add a parallel provider alias, formula, or env parser.
Acceptance Criteria
Out of Scope
- Cloud benchmark and production deployment measurement; remains on #13854.
- #13853
reasoningEffort config leaves and OpenAI-compatible / LM Studio path.
- Ollama serve lifecycle, preload, and context-window residency; owned by #13852.
- Pulling
gemma4:26b during tests. Operators should run ollama pull gemma4:26b before the manual live probe.
Avoided Traps
- Do not close #13854 with only repo-local L1/L2 evidence; its cloud benchmark remains unproven.
- Do not invent a
reasoningEffort config surface ahead of #13853.
- Do not make CI perform live local-model inference or pull large Ollama artifacts.
Related
Related: #13854
Related: #13853
Related: #13852
Related: #12740
Origin Session ID: b9a8f817-9a9e-4243-abfb-62e762a94964
Handoff Retrieval Hints: Ollama native format schema gemma4:26b NEO_TEST_SKIP_CI #13854
Context
This leaf exists because #13854 is intentionally broader than the repo-local change already ready to ship. The parent ticket also contains #13853-dependent
reasoningEffortwork and a cloud benchmark, so a PR that only changes native Ollama defaults / structured-output payload shape must not use #13854 as its close target.Release classification: post-release (repo-local provider parity slice; not release-blocking).
Live latest-open sweep: checked latest 20 open issues at 2026-06-22T10:31:31Z. Closest related tickets were #13854 (broader Ollama/cloud parity parent), #13853 (OpenAI-compatible / LM Studio reasoning-effort sibling), and #13852 (Ollama serving lifecycle). No equivalent closeable leaf for native Ollama
formatschema passthrough +gemma4:26bdefault was present.A2A in-flight claim sweep: checked latest 30 A2A messages at 2026-06-22T10:31:31Z; only overlapping claim was @neo-gpt's own
[lane-claim][#13854] Ollama MoE default + native format schema slice.The Problem
Native Ollama dispatch still defaults
NEO_OLLAMA_MODEL/aiConfig.ollama.modelto the densegemma4:31bmodel while Ollama publishes the 26B A4B MoE under the registry taggemma4:26b. The provider also only maps JSON-output intent toformat: "json"; callers that can provide a JSON schema have no native Ollamaformat: <schema>path and schema hints leak intopayload.optionsinstead of the top-level/api/chatrequest.The Architectural Reality
ai/config.template.mjsis the canonical Tier-1 config template. ADR 0019 requires preserving theleaf(default, env, type)SSOT shape instead of adding parallel env parsing.test/playwright/fixtures/aiConfigDefaults.mjsandtest/playwright/unit/ai/config.template.spec.mjsmirror the Tier-1 defaults for deterministic assertions.ai/provider/Ollama.mjsowns native Ollama/api/chatpayload construction. Ollama's documented API acceptsformatas either"json"or a JSON schema object, and acceptsthinkas a top-level request field for supported models.test/playwright/unit/ai/provider/KeepAlive.spec.mjsalready covers native provider payload shape without requiring a live daemon.The Fix
gemma4:31btogemma4:26bwhile keepingNEO_OLLAMA_MODELas the override leaf.format:responseSchema/response_schema-> schema object;response_format: {type: "json_schema"}-> nested schema object;response_format: {type: "json_object"}and JSON mime hints ->"json".thinkto the native top-level field without inventing areasoningEffortmapping before #13853 lands.NEO_TEST_SKIP_CIis set and only runs whenNEO_RUN_LIVE_OLLAMA_TESTS=1is provided.Contract Ledger Matrix
aiConfig.ollama.modelai/config.template.mjsleafgemma4:26b; env override remainsNEO_OLLAMA_MODELOllama.preparePayload()structured output/api/chatnativeformatfieldpayload.formatformat: "json"for plain JSONOllama.preparePayload()thinkpassthrough/api/chatnative request fieldthinkoption becomes top-levelpayload.think/api/chatschema behaviorDecision Record impact
aligned-with ADR 0019. The change updates the existing config leaf default and does not add a parallel provider alias, formula, or env parser.
Acceptance Criteria
gemma4:26bwhileNEO_OLLAMA_MODELremains the override.formatinstead of leaking schema hints intopayload.options.format: "json".thinkpasses through top-level when provided, without mapping unresolvedreasoningEffortleaves.Out of Scope
reasoningEffortconfig leaves and OpenAI-compatible / LM Studio path.gemma4:26bduring tests. Operators should runollama pull gemma4:26bbefore the manual live probe.Avoided Traps
reasoningEffortconfig surface ahead of #13853.Related
Related: #13854 Related: #13853 Related: #13852 Related: #12740
Origin Session ID: b9a8f817-9a9e-4243-abfb-62e762a94964
Handoff Retrieval Hints:
Ollama native format schema gemma4:26b NEO_TEST_SKIP_CI #13854