PANE

Ollama users face issues with structured output and models

11 posts across 2 communities in the last 60 days; 91% from GitHub.

“No way of knowing without troubleshooting locally, but this might be a context window issue. Ollama truncates input that exceeds its context window, so the model may have only seen a fraction of your vault. Even without truncation, Gemma's window would still probably only fit a…”
r/ObsidianMD
“Before Submitting [x] I searched open and closed issues and discussions for an existing report. [x] I reproduced this bug on the latest release AND on the current dev branch, right before submitting this report. I did not just check an old version or rely on a check from days…”
GitHub
“What is the issue? Observed on Windows with stock Ollama 0.40.13 and independently reproduced with the official portable 0.40.14 release (API version confirmed; archive SHA256 verified). Model: bonsai 2:27b q2 0, digest…”
GitHub

Users are encountering problems using structured outputs with certain Ollama models, including incompatibility with reasoning modes and difficulties parsing outputs from the OpenAI SDK. These issues hinder the effective use of advanced model features.

aidevtoolsollamamodelsapi
FIT
0%
SIGNAL
56%
SOURCES20
FRESHEST POST18D AGO
TRACKED SINCE78D AGO

SOURCES (20)

“Before Submitting [x] I searched open and closed issues and discussions for an existing report. [x] I reproduced this bug on the latest release AND on the current dev branch, right before submitting this report. I did not just check an old version or rely…”

GITHUB18d ago

“Before Submitting [x] I searched open and closed issues and discussions for an existing report. [x] I reproduced this bug on the latest release AND on the current dev branch, right before submitting this report. I did not just check an old version or rely on a check from days ago. [x] I understand that maintainers want a well written issue before any code pull request. [x] This is not a security vulnerability. Installation Method Docker Open WebUI Version v0.13.3, ( ghcr.io/open webui/open webui”

GITHUB19d ago

“Version: 0.13.3 (dev) Symptom: with an Ollama model and native tool calling, any sentence the model writes in the same reply as a tool call ("Let me check the calendar.") is shown in the chat but is missing from everything sent back to Ollama afterwards. That holds for the follow up request after the tool result and for every later message in the chat. Ollama receives that assistant turn with empty text and only the tool call. Steps: 1. Connect an Ollama server and pick a model that writes a sho”

GITHUB24d ago

“What is the issue? Observed on Windows with stock Ollama 0.40.13 and independently reproduced with the official portable 0.40.14 release (API version confirmed; archive SHA256 verified). Model: bonsai 2:27b q2 0, digest f3c4f42086593225d8be9bb4270658d0e05f5232fb2b5e8faa49ef74d2cc843a. Synthetic reproduction In an isolated server, request runtime context 512 (actual allocated context reported as 2048). POST /v1/responses with model bonsai 2:27b q2 0, stream false, max output tokens 1, think false”

GITHUBNov 3

“What is the issue? 千问技术团队,你们好! 我目前正在使用 Qwen3.5 9B 搭建一套本地商品信息抽取系统,主要任务是从 PPT 页面内容中识别商品信息,并输出符合指定 JSON Schema 的结构化数据。 在测试过程中发现一个异常,希望协助确认是否为已知问题,以及是否有推荐的解决方案。 1. 运行环境 推理框架:Ollama 0.32.8 模型:qwen3.5:9b 16k API:/api/chat、/api/generate Thinking:think: false 输出约束:JSON Mode / JSON Schema 最大生成长度:num predict: 256 2. 问题描述 我向模型输入了一页有关故宫折扇设计的 PPT 内容,要求模型判断是否属于商品信息页面,并按照 JSON Schema 返回分类结果。 模型最初能够正确输出 non product 分类结果,但在 JSON 对象结束后,并没有正常停止生成,而是继续输出与输入内容无关的文本,其中包括类似文件路径、文件名等内容。 这些内容并不存在于原始 PPT 页面中,也不是预期的 JSON”

GITHUBOct 28

“What is the issue? ollama show modelfile serializes values by wrapping them in """…""" with no escaping. If the stored value itself contains """ followed by a space or newline, the output is unparseable. On re parse, the value ends at the inner """ and the rest is read as new commands. Delimiter lines such as """ are a common prompt engineering pattern. Such values can come from /api/create ( system ), /save , or models pulled from a registry. Steps to reproduce 1. Create a base model: ollama cr”

GITHUBOct 27

“No way of knowing without troubleshooting locally, but this might be a context window issue. Ollama truncates input that exceeds its context window, so the model may have only seen a fraction of your vault. Even without truncation, Gemma's window would still probably only fit a small part of your vault. I'd maybe try a retrieval augmented generation approach. [re: Beginner: How to make local LLM analyze my vault properly?]”

r/ObsidianMDOct 26

“Before Submitting [x] I searched open and closed issues and discussions for an existing report. [x] I reproduced this bug on the latest release AND on the current dev branch, right before submitting this report. I did not just check an old version or rely on a check from days ago. [x] I understand that maintainers want a well written issue before any code pull request. [x] This is not a security vulnerability. Installation Method Other Open WebUI Version v0.12.0 Operating System macOS 27 Golden”

GITHUBOct 14

“What is the issue? When OLLAMA CONTEXT LENGTH is less than the model's native context window size, the effective available context length is OLLAMA CONTEXT LENGTH not the model's native. When querying the models list via the /api/show or /api/tags each model lists its native context window size, instead of ollama's OLLAMA CONTEXT LENGTH cap. This can result in clients assuming a larger context than actually available and running into truncated messages errors. The OLLAMA CONTEXT LENGTH cap is on”

GITHUBOct 14

“What is the issue? Observed behavior The installed stock qwen3.5:4b , with request local options.num ctx:65536 , returns HTTP 200 and completes with done:true , done reason:"stop" , and positive eval count , but only message.thinking : no content or tool calls. The attached anonymized request reproduced this 3/3 sequential runs directly against Ollama , without VS Code, Copilot, or the extension provider. Expected: a visible answer to the completed task, or a tool call if more work is needed. Th”

GITHUBOct 10

“What is happening? On Windows with Ollama 0.40.0, qwen3.8:27b reproducibly returns HTTP 500 from /api/chat for a large tool aware request: text {"error":"error unmarshalling llama server response: unexpected end of JSON input"} The important observation is that the underlying llama server appears to complete inference normally before Ollama returns the 500. In the reproduced failure: llama server receives approximately 14.8k prompt tokens prompt evaluation completes the model generates 99 tokens”

GITHUBOct 7

“What is the issue? The ollama available from homebrew is broken, it cannot provide structured output when using mlx models. Relevant log output OS macOS GPU Apple CPU Apple Ollama version 0.34.2”

GITHUBSep 22

“What is the issue? On Ollama 0.34.0, the official qwen3:14b model declares the thinking capability, but a non streaming /api/generate request with top level "think": true returns the complete <think ...</think block inside response and leaves thinking empty. The equivalent /api/chat request correctly returns the reasoning in message.thinking and only the final answer in message.content . Both requests below are deterministic, use the same model, prompt, seed, temperature, and output limit, and f”

GITHUBSep 20

“What is the issue? Environment Ollama: 0.34.1 Client: SillyTavern 1.18.0 CPU AMD GPU Radeon RX 9060XT (16GB) Deployment: Ollama and SillyTavern running in Docker containers Model: Reproducible with multiple models Found this PR that is most likely breaking: https://github.com/ollama/ollama/pull/18448 Description After upgrading Ollama to 0.34.1, SillyTavern conversations fail with: The problem is that SillyTavern exposes typical p as part of its AI Response Configuration, but does not provide a”

GITHUBSep 19

“What is the issue? Using https://github.com/ollama/ollama python/releases/tag/v0.6.2 <img width="538" height="34" alt="Image" src="https://github.com/user attachments/assets/d1c66acf 6ae6 4438 895a 6536575f5f95" / New error from the server. I saw the PR https://github.com/ollama/ollama/pull/18448 about TP but I thought it was still allowed. Relevant log output OS Windows GPU Nvidia CPU AMD Ollama version v0.34.2 rc0”

GITHUBSep 15

“What is the issue? Environment Ollama version: 0.30.11 Model: ornith:35b (official library tag, built via custom Modelfile with RENDERER ornith / PARSER ornith ) Local Modelfile override: num ctx set to 8192 → 16384 (base weights unchanged, existing layer reused) GPU: NVIDIA RTX 5090 Laptop, 24GB VRAM, driver 580.173.02, CUDA 13.0 Client/harness: Claude Code (via ANTHROPIC BASE URL=http://localhost:11434 , Anthropic compatible endpoint) Confirmed 100% GPU offload via ollama ps and nvidia smi at”

GITHUBJul 1

“What is the issue? Format output for qwen 3.5 35b model does not count thinking tokens as eval, but adds them as prompt eval. This is the request params: response = client llm.chat(model="qwen3.5:35b", messages=messages, context length= 40000, top p = 0.95, top k = 20, temperature = 1, repeat penalty=1.5, max tokens=6000, stream=True, format=ProcessedTranscription.model json schema(), ) The problem can be identified by changing prompt eval for the same request running several times. Relevant log”

GITHUBMar 19

“What is the issue? OpenAI SDK is unable to parse structured output from gpt oss:20b responses. Ollama is supposed to be compatible with OpenAI SDK structured outputs per this Blog Post. Reproducer: Relevant log output OS macOS GPU Apple CPU Apple Ollama version 0.11.0”

GITHUBAug 2025

“What is the issue? Here is the script to reproduce Output: Note {" occurs twice at the beginning of response . If the thinking mode is turned off, response is a valid JSON: (It seems that when structured output is requested, thinking process is omitted, but that's another topic.) Relevant log output OS macOS GPU Apple CPU Apple Ollama version 0.9.0”

GITHUBMay 2025

“Problem : As far as I know, structured outputs and reasoning models / thinking mode are currently incompatible. As I understand it, using format suppresses next token probability in the model output for any tokens not complying with the desired output structure, thereby "forcing" structured generation. I assume the reason for the incompatibility with reasoning models is that the probability for <think token also will be set to zero, effectively disabling thinking mode for structured outputs. Pro”

GITHUBMay 2025

SOLUTION LANDSCAPE

Brought to you byTop Sectors

A Player feature.See how many ways this pain can be solved, who's already building, and where the gaps are.

More ideas in AI & LLMs →