published fresh until

Ollama: why does array content lose assistant reasoning?

Summary As of November 2026, Ollama reports distinguish reasoning lost from content arrays from the earlier empty-array tool-call repair. Find the documented string-content workaround and the [open proposal](https://github.com/ollama/ollama/pull/19384) for reasoning-only history (checked 2026-11-15).

Not for the 0.40.12 Apple model migration, see ollama-0-40-12-apple-lfm3-dflash2-opencode-migration.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Send assistant content as a plain string for the workaround reported by 1-DARK; Ollama's content-array reasoning repair remains proposed, not merged (#19380, akasakariko, #19384).

Do first: compare the same assistant reasoning with string content and an array of text parts, keeping tool_calls absent; this is 1-DARK's control for the conversion gap (#19380).

Diagnostic: assistant reasoning or an entire turn disappears

1-DARK's October 29 report says an empty parts array causes the “entire assistant message” to be deleted. Nonempty parts keep the message but discard reasoning. Evidence includes unit-level conversion examples and a separately authored reproduction.

Not for: installing the Apple-specific model updates; see ollama-0-40-12-apple-lfm3-dflash2-opencode-migration.

Findings

  • Affected scope: 1-DARK identifies main commit 3fbc609b, /v1/chat/completions, assistant messages with parts-array content and reasoning, without tool calls. The report does not name a released affected version or OS. akasakariko's PR #19384 reports both failures on unmodified main 8861adaa on macOS arm64.
  • Cause: 1-DARK locates the gap in the []any branch of FromChatRequest in openai/openai.go: reasoning propagation and the empty-array preservation case are conditioned on tool calls. The string/null-content branches propagate reasoning without that condition (#19380).
  • Reported workaround: use a plain string for assistant content. The report's same-message control retains reasoning with string content. This addresses the reported text/reasoning case; it does not prescribe flattening image content (#19380).
  • Proposed repair: akasakariko proposes preserving empty assistant turns and assigning reasoning after merging parts regardless of tool calls. The author reports passing regression comparisons for text parts, mixed text/image parts, empty arrays and tool-call cases (#19384).
  • Release status: #19384 is open: proposed, not merged (checked 2026-11-15). The official October 27 v0.40.12 notes, ollama/ollama, mention tool-only Kimi CLI turns. That release note does not establish a repair for this later no-tool-call report; #19380 expressly distinguishes the two paths.

Limits

This is incoming OpenAI-compatible history conversion, not evidence about the quality or availability of a model's generated reasoning. One original reporter and a separate PR author support the two conversion failures. The linked evidence does not establish every Ollama release as affected or validate a general multimodal string-conversion workaround.

Started from a post by @Ollama, packaged by the editor. Original post

Subjects

More in local models

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Ollama: why does array content lose assistant reasoning?
Summary: As of November 2026, Ollama reports distinguish reasoning lost from content arrays from the earlier empty-array tool-call repair. Find the documented string-content workaround and the [open proposal](https://github.com/ollama/ollama/pull/19384) for reasoning-only history (checked 2026-11-15).
Copy for agent
get the whatworks thread ollama-reasoning-content-array-history-loss and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread ollama-reasoning-content-array-history-loss
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp