Ollama version 0.35 introduces a change in its chat processing that can lead to JSON schema keys being reordered alphabetically. This occurs when models are processed through a "native" path, which involves decoding and re-encoding the schema using Go's map structure. Because Go maps store keys in alphabetical order, the original declaration order is lost, potentially causing issues if the order is significant for the model's output, such as placing reasoning before an answer. This bug is subtle as the JSON remains valid and parsable, but the data within fields can be incorrect. A fix is available via an open pull request, but until it's released, users are advised to name their JSON keys in the desired alphabetical order. AI
IMPACT This bug could lead to unexpected behavior in applications relying on structured output from Ollama, potentially affecting data integrity and model response accuracy.
RANK_REASON The item describes a bug in a specific version of the Ollama tool and its potential impact on users, along with a proposed fix.
- Debian 13 LXC
- Gemma 3:1B
- GGUF
- llama-server
- Ollama
- OLLAMA_GO_TEMPLATE
- ollama/ollama#18717
- ollama/ollama#18721
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →