LearnNewsExamplesServices
Frontmatter
id13854
titleOllama/cloud chat-model parity: MoE + structured-output + no-think
stateClosed
labels
enhancementaiarchitecturemodel-experience
assigneesneo-gpt
createdAtJun 22, 2026, 12:13 PM
updatedAt3:20 PM
githubUrlhttps://github.com/neomjs/neo/issues/13854
authorneo-opus-grace
commentsCount4
parentIssue12740
subIssues
13869 Map Ollama reasoning_effort none to think:false
subIssuesCompleted1
subIssuesTotal1
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 24, 2026, 6:21 PM

Ollama/cloud chat-model parity: MoE + structured-output + no-think

Closed v13.1.0/archive-v13-1-0-chunk-5 enhancementaiarchitecturemodel-experience
neo-opus-grace
neo-opus-grace commented on Jun 22, 2026, 12:13 PM

Context

Sibling of #13853 (both sub of epic #12740). #13853 fixes the local (LM Studio / openAiCompatible) chat-model path — switch to the gemma-4-26b-a4b MoE, no-think, provider json_schema. The cloud/production path uses ollama (aiConfig.ollama.model, NEO_OLLAMA_MODEL, default gemma4:31b). The same root cause (dense 31B slow cold-prefill) likely applies on the cloud unless its GPU is materially faster — unverified. This ticket is the ollama-side parity, scoped to proceed in parallel with #13853.

Release classification: post-release (cloud REM pipeline; not release-blocking) → boardless.

The Problem

The ollama path differs from LM Studio in three ways, each requiring verification (NOT yet empirically confirmed — V-B-A required at implementation, unlike #13853 which was fully benchmarked):

  1. Model tag — the MoE's ollama identifier differs from LM Studio's google/gemma-4-26b-a4b (ollama uses its own registry tags; today gemma4:31b). The MoE tag must be found / ollama pull-ed and set in NEO_OLLAMA_MODEL.
  2. Structured output — ollama's native chat API uses a format: <JSON schema> field, not OpenAI-style response_format:{type:'json_schema'}. The ollama provider path must emit the caller schema in ollama's expected shape.
  3. No-think toggle — ollama may not honor reasoning_effort; the gemma-MoE no-think mechanism under ollama may be a prompt token (/no_think) or a different param. Verify, then wire to the same per-task reasoningEffort config leaves introduced in #13853.

The Architectural Reality

  • The ollama provider path (ai/provider/Ollama.mjs or the ollama branch of the provider dispatch — confirm at implementation).
  • aiConfig.ollama.model leaf (default gemma4:31b).
  • The cloud deployment runs ollama via compose-managed OLLAMA_* env (context length, parallel, keep-alive). Deployment specifics live in the private deployment repo — not here.
  • Reuses #13853's per-task reasoningEffort config leaves (summaryReasoningEffort / graphReasoningEffort).

The Fix

  1. Verify + set the ollama MoE model tag (NEO_OLLAMA_MODEL); document the ollama pull step.
  2. Ollama provider emits structured output via ollama's native format field (with the caller's JSON schema).
  3. Verify + wire the ollama no-think mechanism to the per-task reasoningEffort leaves.
  4. Cloud benchmark — measure the ollama MoE cold-prefill vs the dense gemma4:31b on the cloud hardware; confirm the prefill win, or document if the cloud GPU makes the dense 31B acceptable (in which case the model-switch is local-only).

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
aiConfig.ollama.model config leaf (ADR 0019) default → ollama MoE tag env NEO_OLLAMA_MODEL config.template.mjs JSDoc pending cloud benchmark
ollama provider structured output ollama provider path emit native format:<schema> prompt-only provider JSDoc pending V-B-A (ollama format)
ollama no-think ollama provider / prompt wire to reasoningEffort leaves thinking-on method JSDoc pending V-B-A (ollama no-think)

Decision Record impact

aligned-with ADR 0019 (config leaves resolved at use-site). Sibling of #13853; both realize epic #12740 (per-task model routing) for their respective providers.

Acceptance Criteria

  • ollama MoE model tag identified, ollama pull-documented, set as NEO_OLLAMA_MODEL default (or env).
  • ollama provider emits structured output via the native format field with the caller schema; extraction + summary produce valid schema-correct JSON.
  • ollama no-think mechanism verified + wired to the per-task reasoningEffort leaves (#13853).
  • Cloud benchmark: ollama MoE prefill measured vs dense gemma4:31b; result documented (win confirmed, or dense-31B-acceptable-on-cloud-GPU noted).

Out of Scope

  • The local LM Studio / openAiCompatible path (#13853).
  • The orchestrator ollama serving lifecycle (#13852ollama serve ensure + num_ctx preload); this ticket is model-choice + structured-output + no-think, not serving.

Avoided Traps

  • Assuming ollama == LM Studio. ollama's structured-output (format) and no-think mechanisms are NOT the same as LM Studio's response_format:json_schema / reasoning_effort — each is a verify-then-wire task, not a copy of #13853.
  • Assuming the cloud has the same prefill problem. Unverified — the cloud GPU may prefill the dense 31B acceptably; the benchmark decides whether the switch is cloud-needed.

Related

  • Local sibling: #13853.
  • Parent epic: #12740 (per-task model routing).
  • Adjacent: #13852 (ollama serving lifecycle), #13851 (context verification).

Origin Session ID

2439c28b-245e-425a-85a7-ca7ee4aa0336

Handoff Retrieval Hints

  • query_summaries: "ollama gemma MoE structured output format no-think cloud benchmark #13853"
  • Live latest-open sweep: checked open issues at 2026-06-22T10:08Z; no equivalent (closest #13852 = serving lifecycle, not model-choice). Scoped for parallel pickup per operator direction.
tobiu
tobiu Jun 24, 2026, 6:21 PM

deployment benchmark is out of scope here.