[GH-ISSUE #11057] Command-r problem with tool use #84979

Open
opened 2026-05-09 22:13:44 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @ArnaudPannatier on GitHub (Jun 12, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11057

Originally assigned to: @ParthSareen on GitHub.

What is the issue?

There seem to be a problem with the command-r model. It is mentioned that it supports tools and the prompt seem to be coherent with that.

How ever in practice it is not able to call them coherently:

curl http://localhost:11434/api/chat -d '{
    "model": "command-r",
    "stream" : false,
    "options": {
        "temperature": 0.0
    },
    "messages": [
        {
            "role": "user",
            "content": "What's the weather in nyc?"
        }
    ],
    "tools": [
        {
            "type": "function",
            "function": {
                "name": "get_weather",
                "description": "Use this to get weather information.",
                "parameters": {
                    "type": "object",
                    "required": [
                        "city"
                    ],
                    "properties": {
                        "city": {
                            "type": "string",
                            "enum": [
                                "nyc",
                                "sf"
                            ]
                        }
                    }
                }
            }
        }
    ]
}
{"model":"command-r","created_at":"2025-06-12T12:20:33.618453025Z","message":{"role":"assistant","content":"Action: ```json\n[\n    {\n        \"tool_name\": \"get_weather\",\n        \"parameters\": {\n            \"city\": \"nyc\"\n        }    }\n]\n```"},"done_reason":"stop","done":true,"total_duration":5716502729,"load_duration":4448457708,"prompt_eval_count":412,"prompt_eval_duration":307338700,"eval_count":41,"eval_duration":959162054}% 
curl http://localhost:11434/api/chat -d '{
    "model": "llama3.3:70b",
    "stream" : false,
    "options": {
        "temperature": 0.0
    },
    "messages": [
        {
            "role": "user",
            "content": "Whats the weather in nyc? lksdjhfalsduhfaoiuegfqoiew"
        }
    ],
    "tools": [
        {
            "type": "function",
            "function": {
                "name": "get_weather",
                "description": "Use this to get weather information.",
                "parameters": {
                    "type": "object",
                    "required": [
                        "city"
                    ],
                    "properties": {
                        "city": {
                            "type": "string",
                            "enum": [
                                "nyc",
                                "sf"
                            ]
                        }
                    }
                }
            }
        }
    ]
}'

gives:

{"model":"llama3.3:70b","created_at":"2025-06-12T12:20:08.389820201Z","message":{"role":"assistant","content":"","tool_calls":[{"function":{"name":"get_weather","arguments":{"city":"nyc"}}}]},"done_reason":"stop","done":true,"total_duration":1112002299,"load_duration":11193408,"prompt_eval_count":182,"prompt_eval_duration":146428587,"eval_count":18,"eval_duration":953970525}%  

Relevant log output


OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @ArnaudPannatier on GitHub (Jun 12, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11057 Originally assigned to: @ParthSareen on GitHub. ### What is the issue? There seem to be a problem with the command-r model. [It is mentioned](https://ollama.com/library/command-r:latest/blobs/922095537bc1) that it supports tools and the prompt seem to be coherent with that. How ever in practice it is not able to call them coherently: ``` curl http://localhost:11434/api/chat -d '{ "model": "command-r", "stream" : false, "options": { "temperature": 0.0 }, "messages": [ { "role": "user", "content": "What's the weather in nyc?" } ], "tools": [ { "type": "function", "function": { "name": "get_weather", "description": "Use this to get weather information.", "parameters": { "type": "object", "required": [ "city" ], "properties": { "city": { "type": "string", "enum": [ "nyc", "sf" ] } } } } } ] } ``` ``` {"model":"command-r","created_at":"2025-06-12T12:20:33.618453025Z","message":{"role":"assistant","content":"Action: ```json\n[\n {\n \"tool_name\": \"get_weather\",\n \"parameters\": {\n \"city\": \"nyc\"\n } }\n]\n```"},"done_reason":"stop","done":true,"total_duration":5716502729,"load_duration":4448457708,"prompt_eval_count":412,"prompt_eval_duration":307338700,"eval_count":41,"eval_duration":959162054}% ``` ``` curl http://localhost:11434/api/chat -d '{ "model": "llama3.3:70b", "stream" : false, "options": { "temperature": 0.0 }, "messages": [ { "role": "user", "content": "Whats the weather in nyc? lksdjhfalsduhfaoiuegfqoiew" } ], "tools": [ { "type": "function", "function": { "name": "get_weather", "description": "Use this to get weather information.", "parameters": { "type": "object", "required": [ "city" ], "properties": { "city": { "type": "string", "enum": [ "nyc", "sf" ] } } } } } ] }' ``` gives: ``` {"model":"llama3.3:70b","created_at":"2025-06-12T12:20:08.389820201Z","message":{"role":"assistant","content":"","tool_calls":[{"function":{"name":"get_weather","arguments":{"city":"nyc"}}}]},"done_reason":"stop","done":true,"total_duration":1112002299,"load_duration":11193408,"prompt_eval_count":182,"prompt_eval_duration":146428587,"eval_count":18,"eval_duration":953970525}% ``` ### Relevant log output ```shell ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the toolsbug labels 2026-05-09 22:13:44 -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#84979