[GH-ISSUE #11112] 0.9.1 breaks tool calling for qwen3 #69390

Closed
opened 2026-05-04 17:58:16 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @Devansh-bit on GitHub (Jun 18, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11112

Originally assigned to: @jmorganca on GitHub.

What is the issue?

The model shows its intent to call tools in its thinking, but neither there is any tool call associated with the response nor there is a normal response string. Same code works perfectly with 0.9.0

llm = ChatOllama(model="qwen3:8b", temperature=0.0, seed=1)
self.llm = llm.bind_tools([get_current_datetime])
test_response = self.llm.invoke([
    SystemMessage("You are a helpful assistant. Use tools when needed."),
    HumanMessage("What's the current date and time?")
])
print(f"Test response: {test_response}")

Response in 0.9.1

Test response: content="<think>\nOkay, the user is asking for the current date and time. Let me check the tools available. There's a function called get_current_datetime that returns the datetime in a specific format. I don't need any parameters for this. I'll call that function to get the answer.\n</think>\n\n" additional_kwargs={} response_metadata={'model': 'qwen3:8b', 'created_at': '2025-06-18T11:53:56.7284535Z', 'done': True, 'done_reason': 'stop', 'total_duration': 4991868400, 'load_duration': 3131632000, 'prompt_eval_count': 541, 'prompt_eval_duration': 432141200, 'eval_count': 77, 'eval_duration': 1422343500, 'model_name': 'qwen3:8b'} id='run--c4f3f0a6-e6cb-41e7-ba3c-0453f1d9e491-0' usage_metadata={'input_tokens': 541, 'output_tokens': 77, 'total_tokens': 618}

Previous response (in 0.9.0)

Test response: content="<think>\nOkay, the user is asking for the current date and time. Let me check the tools available. There's a function called get_current_datetime that returns the datetime in a specific format. I don't need any parameters for this. I'll call that function to get the answer.\n</think>\n\n" additional_kwargs={} response_metadata={'model': 'qwen3:8b', 'created_at': '2025-06-18T11:48:57.9530064Z', 'done': True, 'done_reason': 'stop', 'total_duration': 1855447600, 'load_duration': 17265100, 'prompt_eval_count': 541, 'prompt_eval_duration': 505970800, 'eval_count': 77, 'eval_duration': 1327688200, 'model_name': 'qwen3:8b'} id='run--676df2f1-1df0-4ba9-a48d-c81ea99951a3-0' tool_calls=[{'name': 'get_current_datetime', 'args': {}, 'id': 'db693716-c8a7-4383-b85e-0ac6618a631e', 'type': 'tool_call'}] usage_metadata={'input_tokens': 541, 'output_tokens': 77, 'total_tokens': 618}

OS

Windows

GPU

RTX 3070 laptop GPU

CPU

i7-11800H

Ollama version

0.9.1

Originally created by @Devansh-bit on GitHub (Jun 18, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11112 Originally assigned to: @jmorganca on GitHub. ### What is the issue? The model shows its intent to call tools in its thinking, but neither there is any tool call associated with the response nor there is a normal response string. Same code works perfectly with 0.9.0 ```python llm = ChatOllama(model="qwen3:8b", temperature=0.0, seed=1) self.llm = llm.bind_tools([get_current_datetime]) test_response = self.llm.invoke([ SystemMessage("You are a helpful assistant. Use tools when needed."), HumanMessage("What's the current date and time?") ]) print(f"Test response: {test_response}") ``` Response in 0.9.1 ```shell Test response: content="<think>\nOkay, the user is asking for the current date and time. Let me check the tools available. There's a function called get_current_datetime that returns the datetime in a specific format. I don't need any parameters for this. I'll call that function to get the answer.\n</think>\n\n" additional_kwargs={} response_metadata={'model': 'qwen3:8b', 'created_at': '2025-06-18T11:53:56.7284535Z', 'done': True, 'done_reason': 'stop', 'total_duration': 4991868400, 'load_duration': 3131632000, 'prompt_eval_count': 541, 'prompt_eval_duration': 432141200, 'eval_count': 77, 'eval_duration': 1422343500, 'model_name': 'qwen3:8b'} id='run--c4f3f0a6-e6cb-41e7-ba3c-0453f1d9e491-0' usage_metadata={'input_tokens': 541, 'output_tokens': 77, 'total_tokens': 618} ``` Previous response (in 0.9.0) ```shell Test response: content="<think>\nOkay, the user is asking for the current date and time. Let me check the tools available. There's a function called get_current_datetime that returns the datetime in a specific format. I don't need any parameters for this. I'll call that function to get the answer.\n</think>\n\n" additional_kwargs={} response_metadata={'model': 'qwen3:8b', 'created_at': '2025-06-18T11:48:57.9530064Z', 'done': True, 'done_reason': 'stop', 'total_duration': 1855447600, 'load_duration': 17265100, 'prompt_eval_count': 541, 'prompt_eval_duration': 505970800, 'eval_count': 77, 'eval_duration': 1327688200, 'model_name': 'qwen3:8b'} id='run--676df2f1-1df0-4ba9-a48d-c81ea99951a3-0' tool_calls=[{'name': 'get_current_datetime', 'args': {}, 'id': 'db693716-c8a7-4383-b85e-0ac6618a631e', 'type': 'tool_call'}] usage_metadata={'input_tokens': 541, 'output_tokens': 77, 'total_tokens': 618} ``` ### OS Windows ### GPU RTX 3070 laptop GPU ### CPU i7-11800H ### Ollama version 0.9.1
GiteaMirror added the bug label 2026-05-04 17:58:16 -05:00
Author
Owner

@jmorganca commented on GitHub (Jun 18, 2025):

Sorry about this. A fix is on the way in https://github.com/ollama/ollama/pull/11113 and will be released in 0.9.2.

<!-- gh-comment-id:2983938347 --> @jmorganca commented on GitHub (Jun 18, 2025): Sorry about this. A fix is on the way in https://github.com/ollama/ollama/pull/11113 and will be released in 0.9.2.
Author
Owner

@Devansh-bit commented on GitHub (Jun 18, 2025):

That was quick! Thank you

<!-- gh-comment-id:2984141982 --> @Devansh-bit commented on GitHub (Jun 18, 2025): That was quick! Thank you
Author
Owner

@jmorganca commented on GitHub (Jun 18, 2025):

@Devansh-bit 0.9.2 is out now and should have this fixed. Thanks for reporting!

<!-- gh-comment-id:2984846086 --> @jmorganca commented on GitHub (Jun 18, 2025): @Devansh-bit 0.9.2 is out now and should have this fixed. Thanks for reporting!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#69390