[GH-ISSUE #3896] Command-R fails when using format=json #64450

Open
opened 2026-05-03 17:43:20 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @derenrich on GitHub (Apr 25, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3896

What is the issue?

For some reason command-r is failing when put into JSON format mode. It seems to work fine otherwise.

% ollama run command-r  --verbose "output the usa as a json"
` ``json
{
    "country": "United States of America",
    "capital": "Washington, D.C.",
    "population": 333,271,411,
    "states": 50,
    "president": "Joe Biden"
}
` ``

total duration:       6.241768s
load duration:        2.127476417s
prompt eval count:    12 token(s)
prompt eval duration: 249.108ms
prompt eval rate:     48.17 tokens/s
eval count:           63 token(s)
eval duration:        3.86453s
eval rate:            16.30 tokens/s

% ollama run command-r --format json --verbose "output the usa as a json"
Error: an unknown error was encountered while running the model

llama3 though does work for json format output:

% ollama run llama3 --format json --verbose "output the florida as a json"
{ "name": "Florida", "capital": "Tallahassee", "population": 21477747, "area": 170312, "cities": ["Jacksonville", "Miami", "Tamiami Trail", "Orlando", "St Petersburg"], "fun_facts": [ "Florida is known as the Sunshine State because of its
abundant sunshine and warm weather.", "The state has a diverse range of ecosystems, including beaches, mangroves, and forests." ] }

OS

macOS

GPU

Apple

CPU

Apple

Ollama version

0.1.32

Originally created by @derenrich on GitHub (Apr 25, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3896 ### What is the issue? For some reason command-r is failing when put into JSON format mode. It seems to work fine otherwise. ``` % ollama run command-r --verbose "output the usa as a json" ` ``json { "country": "United States of America", "capital": "Washington, D.C.", "population": 333,271,411, "states": 50, "president": "Joe Biden" } ` `` total duration: 6.241768s load duration: 2.127476417s prompt eval count: 12 token(s) prompt eval duration: 249.108ms prompt eval rate: 48.17 tokens/s eval count: 63 token(s) eval duration: 3.86453s eval rate: 16.30 tokens/s % ollama run command-r --format json --verbose "output the usa as a json" Error: an unknown error was encountered while running the model ``` llama3 though does work for json format output: ``` % ollama run llama3 --format json --verbose "output the florida as a json" { "name": "Florida", "capital": "Tallahassee", "population": 21477747, "area": 170312, "cities": ["Jacksonville", "Miami", "Tamiami Trail", "Orlando", "St Petersburg"], "fun_facts": [ "Florida is known as the Sunshine State because of its abundant sunshine and warm weather.", "The state has a diverse range of ecosystems, including beaches, mangroves, and forests." ] } ``` ### OS macOS ### GPU Apple ### CPU Apple ### Ollama version 0.1.32
GiteaMirror added the bug label 2026-05-03 17:43:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#64450