[GH-ISSUE #14745] qwen3.5:9b sometimes prints out tool call instead of executing it #87222

Closed
opened 2026-05-10 05:08:08 -05:00 by GiteaMirror · 13 comments
Owner

Originally created by @Kangaroux on GitHub (Mar 9, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/14745

Originally assigned to: @jmorganca on GitHub.

workaround: use ollama 0.17.5

What is the issue?

Using the model from ollama.com and Opencode 1.2.24. This happens fairly often and halts the work the agent was doing.

Thinking: I need to mock Valkey for tests. Let me check how the app initializes Valkey and update TESTING.md with this information.
<tool_call>
<function=bash>
<parameter=command>
grep "redacted" | head -20
</parameter>
<parameter=description>
Find Valkey initialization
</parameter>
</function>
</tool_call>
$ ollama ls
NAME          ID              SIZE      MODIFIED     
qwen3.5:9b    6488c96fa5fa    6.6 GB    25 hours ago
$ ollama show qwen3.5:9b
  Model
    architecture        qwen35    
    parameters          9.7B      
    context length      262144    
    embedding length    4096      
    quantization        Q4_K_M    
    requires            0.17.1    

  Capabilities
    completion    
    vision        
    tools         
    thinking      

  Parameters
    presence_penalty    1.5     
    temperature         1       
    top_k               20      
    top_p               0.95    

  License
    Apache License               
    Version 2.0, January 2004    
    ...
$ ollama show --modelfile qwen3.5:9b
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this, replace FROM with:
# FROM qwen3.5:9b

FROM /usr/share/ollama/.ollama/models/blobs/sha256-dec52a44569a2a25341c4e4d3fee25846eed4f6f0b936278e3a3c900bb99d37c
TEMPLATE {{ .Prompt }}
RENDERER qwen3.5
PARSER qwen3.5
PARAMETER temperature 1
PARAMETER top_k 20
PARAMETER top_p 0.95
PARAMETER presence_penalty 1.5

Relevant log output


OS

Linux

GPU

AMD

CPU

AMD

Ollama version

0.17.7

Originally created by @Kangaroux on GitHub (Mar 9, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/14745 Originally assigned to: @jmorganca on GitHub. ## workaround: use ollama 0.17.5 ### What is the issue? Using the model from ollama.com and Opencode 1.2.24. This happens fairly often and halts the work the agent was doing. ``` Thinking: I need to mock Valkey for tests. Let me check how the app initializes Valkey and update TESTING.md with this information. <tool_call> <function=bash> <parameter=command> grep "redacted" | head -20 </parameter> <parameter=description> Find Valkey initialization </parameter> </function> </tool_call> ``` ``` $ ollama ls NAME ID SIZE MODIFIED qwen3.5:9b 6488c96fa5fa 6.6 GB 25 hours ago ``` ``` $ ollama show qwen3.5:9b Model architecture qwen35 parameters 9.7B context length 262144 embedding length 4096 quantization Q4_K_M requires 0.17.1 Capabilities completion vision tools thinking Parameters presence_penalty 1.5 temperature 1 top_k 20 top_p 0.95 License Apache License Version 2.0, January 2004 ... ``` ``` $ ollama show --modelfile qwen3.5:9b # Modelfile generated by "ollama show" # To build a new Modelfile based on this, replace FROM with: # FROM qwen3.5:9b FROM /usr/share/ollama/.ollama/models/blobs/sha256-dec52a44569a2a25341c4e4d3fee25846eed4f6f0b936278e3a3c900bb99d37c TEMPLATE {{ .Prompt }} RENDERER qwen3.5 PARSER qwen3.5 PARAMETER temperature 1 PARAMETER top_k 20 PARAMETER top_p 0.95 PARAMETER presence_penalty 1.5 ``` ### Relevant log output ```shell ``` ### OS Linux ### GPU AMD ### CPU AMD ### Ollama version 0.17.7
GiteaMirror added the bug label 2026-05-10 05:08:08 -05:00
Author
Owner
<!-- gh-comment-id:4026249854 --> @Kangaroux commented on GitHub (Mar 9, 2026): Possibly related? - https://github.com/ollama/ollama/issues/14493 - https://github.com/ollama/ollama/issues/14601 - https://github.com/ollama/ollama/pull/14603
Author
Owner

@nandakho commented on GitHub (Mar 10, 2026):

yeah, i experienced this issue too, while running opencode with ollama 0.17.6 and 0.17.7.
seems related with how thinking tag open/close.
however, using 0.17.5 i haven't encountered this issue, so i'm sticking with it until further update

<!-- gh-comment-id:4027863732 --> @nandakho commented on GitHub (Mar 10, 2026): yeah, i experienced this issue too, while running opencode with ollama 0.17.6 and 0.17.7. seems related with how thinking tag open/close. however, using 0.17.5 i haven't encountered this issue, so i'm sticking with it until further update
Author
Owner

@TheSpaceGod commented on GitHub (Mar 10, 2026):

Having same issue as well. Can confirm switching to 17.5 also fixed the issue for me

<!-- gh-comment-id:4031213150 --> @TheSpaceGod commented on GitHub (Mar 10, 2026): Having same issue as well. Can confirm switching to 17.5 also fixed the issue for me
Author
Owner

@Kangaroux commented on GitHub (Mar 10, 2026):

yeah, i experienced this issue too with opencode on 0.17.6 and 0.17.7. seems related with how thinking tag open/close. however, using 0.17.5 i haven't encountered this issue, so i'm sticking with it until further update

You meant ollama yeah?

<!-- gh-comment-id:4032009091 --> @Kangaroux commented on GitHub (Mar 10, 2026): > yeah, i experienced this issue too with opencode on 0.17.6 and 0.17.7. seems related with how thinking tag open/close. however, using 0.17.5 i haven't encountered this issue, so i'm sticking with it until further update You meant ollama yeah?
Author
Owner

@TheSpaceGod commented on GitHub (Mar 10, 2026):

yeah, i experienced this issue too with opencode on 0.17.6 and 0.17.7. seems related with how thinking tag open/close. however, using 0.17.5 i haven't encountered this issue, so i'm sticking with it until further update

You meant ollama yeah?

Yes, ollama

<!-- gh-comment-id:4032051248 --> @TheSpaceGod commented on GitHub (Mar 10, 2026): > > yeah, i experienced this issue too with opencode on 0.17.6 and 0.17.7. seems related with how thinking tag open/close. however, using 0.17.5 i haven't encountered this issue, so i'm sticking with it until further update > > You meant ollama yeah? Yes, ollama
Author
Owner

@nandakho commented on GitHub (Mar 11, 2026):

yeah, i experienced this issue too with opencode on 0.17.6 and 0.17.7. seems related with how thinking tag open/close. however, using 0.17.5 i haven't encountered this issue, so i'm sticking with it until further update

You meant ollama yeah?

Yes, ollama. Edited to avoid confusion.

<!-- gh-comment-id:4036037367 --> @nandakho commented on GitHub (Mar 11, 2026): > > yeah, i experienced this issue too with opencode on 0.17.6 and 0.17.7. seems related with how thinking tag open/close. however, using 0.17.5 i haven't encountered this issue, so i'm sticking with it until further update > > You meant ollama yeah? Yes, ollama. Edited to avoid confusion.
Author
Owner

@aldi7th commented on GitHub (Mar 13, 2026):

Downgrade to 0.17.5 works for me, and I tried 0.17.8-rc3, still encountered this issue.

<!-- gh-comment-id:4052553576 --> @aldi7th commented on GitHub (Mar 13, 2026): Downgrade to 0.17.5 works for me, and I tried 0.17.8-rc3, still encountered this issue.
Author
Owner

@metal3d commented on GitHub (Mar 13, 2026):

I don't know what changed in 0.17.6 but I have the problem too and I needed to downgrade to 0.17.5 to have the model using tools correctly.

<!-- gh-comment-id:4053517643 --> @metal3d commented on GitHub (Mar 13, 2026): I don't know what changed in 0.17.6 but I have the problem too and I needed to downgrade to 0.17.5 to have the model using tools correctly.
Author
Owner

@mnlipp commented on GitHub (Mar 16, 2026):

The problem still exists with 0.18.

<!-- gh-comment-id:4069057854 --> @mnlipp commented on GitHub (Mar 16, 2026): The problem still exists with 0.18.
Author
Owner

@TheSpaceGod commented on GitHub (Mar 17, 2026):

Related PR that likely introduced the bug which other tickets are linking to: https://github.com/ollama/ollama/pull/14605

<!-- gh-comment-id:4076778583 --> @TheSpaceGod commented on GitHub (Mar 17, 2026): Related PR that likely introduced the bug which other tickets are linking to: https://github.com/ollama/ollama/pull/14605
Author
Owner

@LR1093141031 commented on GitHub (Mar 19, 2026):

0.18.2 still

<!-- gh-comment-id:4088383360 --> @LR1093141031 commented on GitHub (Mar 19, 2026): 0.18.2 still
Author
Owner

@krvkir commented on GitHub (Mar 19, 2026):

I get an error which looks similar but is probably of different origin. I try to use ollama in jupyter via jupyter-ai. Tools work fine with gemini3.1 hosted by Google, but when I use gemini3 over ollama (running in the cloud), I get this:

{"name": "get_active_notebook", "arguments": {"username": "<my user id>"}}

and the model halts after this message.

The same happens with ollama with other large models in the cloud and with small models running locally.

Ollama version is 0.18. I tried downgrading it to 0.17.5, but the problem was still there.

Interesting is that the same models happily use tools in emacs+gptel, so that's possibly a jupyter-ai bug.

<!-- gh-comment-id:4091896682 --> @krvkir commented on GitHub (Mar 19, 2026): I get an error which looks similar but is probably of different origin. I try to use ollama in jupyter via jupyter-ai. Tools work fine with gemini3.1 hosted by Google, but when I use gemini3 over ollama (running in the cloud), I get this: ``` {"name": "get_active_notebook", "arguments": {"username": "<my user id>"}} ``` and the model halts after this message. The same happens with ollama with other large models in the cloud and with small models running locally. Ollama version is 0.18. I tried downgrading it to 0.17.5, but the problem was still there. Interesting is that the same models happily use tools in emacs+gptel, so that's possibly a jupyter-ai bug.
Author
Owner

@fmacpro commented on GitHub (Apr 20, 2026):

yeah, i experienced this issue too, while running opencode with ollama 0.17.6 and 0.17.7. seems related with how thinking tag open/close. however, using 0.17.5 i haven't encountered this issue, so i'm sticking with it until further update

Thankyou! this helped me get qwen2.5-coder:latest tool calls working in vscode copilot chat with Ollama running in the WSL environment

<!-- gh-comment-id:4284150344 --> @fmacpro commented on GitHub (Apr 20, 2026): > yeah, i experienced this issue too, while running opencode with ollama 0.17.6 and 0.17.7. seems related with how thinking tag open/close. however, using 0.17.5 i haven't encountered this issue, so i'm sticking with it until further update Thankyou! this helped me get `qwen2.5-coder:latest` tool calls working in vscode copilot chat with Ollama running in the WSL environment
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#87222