[GH-ISSUE #7136] Tool binding prevent streaming #4533

Closed
opened 2026-04-12 15:28:13 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @pyautoml on GitHub (Oct 8, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7136

What is the issue?

Hi there. I discovered recently that onces a model is delivered tool via bind_tools is stops recognizing streeaming, and each time it waits for the data to be fully loaded.

This snippet below works perfectly fine until tools are added:

print("AI:", end=" ", flush=True)
for chunk in self.model.stream([("human", user_input)], callbacks=[streaming_handler]):
if chunk.content:
print(chunk.content, end='', flush=True)

It happens regardless of the model type.

OS

Windows

GPU

No response

CPU

Intel

Ollama version

0.3.11

Originally created by @pyautoml on GitHub (Oct 8, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7136 ### What is the issue? Hi there. I discovered recently that onces a model is delivered tool via bind_tools is stops recognizing streeaming, and each time it waits for the data to be fully loaded. This snippet below works perfectly fine until tools are added: print("AI:", end=" ", flush=True) for chunk in self.model.stream([("human", user_input)], callbacks=[streaming_handler]): if chunk.content: print(chunk.content, end='', flush=True) It happens regardless of the model type. ### OS Windows ### GPU _No response_ ### CPU Intel ### Ollama version 0.3.11
GiteaMirror added the bug label 2026-04-12 15:28:13 -05:00
Author
Owner

@rick-github commented on GitHub (Oct 8, 2024):

https://github.com/ollama/ollama/issues/5796

<!-- gh-comment-id:2400254468 --> @rick-github commented on GitHub (Oct 8, 2024): https://github.com/ollama/ollama/issues/5796
Author
Owner

@LuckLittleBoy commented on GitHub (Oct 10, 2024):

I hope streaming tool calls will be supported soon. I've been waiting for this for a long time.

<!-- gh-comment-id:2404217643 --> @LuckLittleBoy commented on GitHub (Oct 10, 2024): I hope streaming tool calls will be supported soon. I've been waiting for this for a long time.
Author
Owner

@pdevine commented on GitHub (Oct 16, 2024):

Going to close this as a dupe.

<!-- gh-comment-id:2415553609 --> @pdevine commented on GitHub (Oct 16, 2024): Going to close this as a dupe.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#4533