[GH-ISSUE #3513] Stream: false is ignored in as of c863c6a96d #27925

Closed
opened 2026-04-22 05:35:15 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @eusebiu on GitHub (Apr 6, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3513

What is the issue?

Stream: false is ignored

What did you expect to see?

When stream is set to false, the response should contain the full result.

Steps to reproduce

Pull the latest code, compile, run (pull some model), run /api/generate with stream: false -> the result has no content (just some new lines) and "done: false".

Are there any recent changes that introduced the issue?

I think this c863c6a96d breaks it (Tested before and after this commit).

OS

Windows

Architecture

amd64

Platform

No response

Ollama version

latest

GPU

Nvidia

GPU info

Quadro RTX 5000 with Max-Q Design

CPU

Intel

Other software

No response

Originally created by @eusebiu on GitHub (Apr 6, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3513 ### What is the issue? Stream: false is ignored ### What did you expect to see? When stream is set to false, the response should contain the full result. ### Steps to reproduce Pull the latest code, compile, run (pull some model), run /api/generate with stream: false -> the result has no content (just some new lines) and "done: false". ### Are there any recent changes that introduced the issue? I think this https://github.com/ollama/ollama/commit/c863c6a96d01afda37b65f86eb14a1f04a3c7c47 breaks it (Tested before and after this commit). ### OS Windows ### Architecture amd64 ### Platform _No response_ ### Ollama version latest ### GPU Nvidia ### GPU info Quadro RTX 5000 with Max-Q Design ### CPU Intel ### Other software _No response_
GiteaMirror added the bug label 2026-04-22 05:35:15 -05:00
Author
Owner

@eusebiu commented on GitHub (Apr 6, 2024):

Relates to #3502

<!-- gh-comment-id:2041047993 --> @eusebiu commented on GitHub (Apr 6, 2024): Relates to #3502
Author
Owner

@eusebiu commented on GitHub (Apr 6, 2024):

Apparently, it stops here: a5ec9cfc0f/llm/server.go (L630)

I've tried building with latest llama.cpp but the result is the same...

<!-- gh-comment-id:2041110131 --> @eusebiu commented on GitHub (Apr 6, 2024): Apparently, it stops here: https://github.com/ollama/ollama/blob/a5ec9cfc0f5b49ff0496edc5e6b4ed8ab503e14a/llm/server.go#L630 I've tried building with latest llama.cpp but the result is the same...
Author
Owner

@pdevine commented on GitHub (Apr 12, 2024):

It seems to be working fine from both macos and windows. Here's the output in macos:

% curl localhost:11434/api/generate -d '{"model": "mistral", "stream": false, "prompt": "why is the sky blue?"}'
{"model":"mistral","created_at":"2024-04-12T21:11:43.98872Z","response":" The color of the sky appears blue due to a process called Rayleigh scattering. As sunlight reaches Earth's atmosphere, it interacts with different particles and gases, most notably with molecules of nitrogen and oxygen. These particles scatter short-wavelength light, such as blue and violet light, more than longer wavelengths, like red or orange.\n\nHowever, human eyes are more sensitive to blue light and less sensitive to violet light, so we perceive the sky as blue rather than violet. At sunrise and sunset, when the sun is closer to the horizon and its light has to pass through more atmosphere, the scattering causes the sky to appear red or orange due to the preferential scattering of shorter wavelengths.","done":true,"context":[733,16289,28793,28705,2079,349,272,7212,5045,28804,733,28748,16289,28793,415,3181,302,272,7212,8045,5045,2940,298,264,1759,1987,8952,291,956,21635,28723,1136,22950,18710,8599,28742,28713,13789,28725,378,791,9664,395,1581,13938,304,319,2018,28725,1080,27886,395,12160,21649,302,22292,25502,304,21058,28723,2957,13938,11190,2485,28733,28727,26795,2061,28725,1259,390,5045,304,363,20346,2061,28725,680,821,3774,275,26795,28713,28725,737,2760,442,14545,28723,13,13,27955,28725,2930,2282,460,680,13509,298,5045,2061,304,2108,13509,298,363,20346,2061,28725,579,478,660,11642,272,7212,390,5045,3210,821,363,20346,28723,1794,4376,24035,304,4376,673,28725,739,272,4376,349,7887,298,272,18259,304,871,2061,659,298,1455,1059,680,13789,28725,272,21635,10110,272,7212,298,4305,2760,442,14545,2940,298,272,5273,2256,21635,302,19367,275,26795,28713,28723],"total_duration":2859657208,"load_duration":409096958,"prompt_eval_count":15,"prompt_eval_duration":70186000,"eval_count":156,"eval_duration":2380045000}%

This is with 0.1.31.

<!-- gh-comment-id:2052602313 --> @pdevine commented on GitHub (Apr 12, 2024): It seems to be working fine from both macos and windows. Here's the output in macos: ``` % curl localhost:11434/api/generate -d '{"model": "mistral", "stream": false, "prompt": "why is the sky blue?"}' {"model":"mistral","created_at":"2024-04-12T21:11:43.98872Z","response":" The color of the sky appears blue due to a process called Rayleigh scattering. As sunlight reaches Earth's atmosphere, it interacts with different particles and gases, most notably with molecules of nitrogen and oxygen. These particles scatter short-wavelength light, such as blue and violet light, more than longer wavelengths, like red or orange.\n\nHowever, human eyes are more sensitive to blue light and less sensitive to violet light, so we perceive the sky as blue rather than violet. At sunrise and sunset, when the sun is closer to the horizon and its light has to pass through more atmosphere, the scattering causes the sky to appear red or orange due to the preferential scattering of shorter wavelengths.","done":true,"context":[733,16289,28793,28705,2079,349,272,7212,5045,28804,733,28748,16289,28793,415,3181,302,272,7212,8045,5045,2940,298,264,1759,1987,8952,291,956,21635,28723,1136,22950,18710,8599,28742,28713,13789,28725,378,791,9664,395,1581,13938,304,319,2018,28725,1080,27886,395,12160,21649,302,22292,25502,304,21058,28723,2957,13938,11190,2485,28733,28727,26795,2061,28725,1259,390,5045,304,363,20346,2061,28725,680,821,3774,275,26795,28713,28725,737,2760,442,14545,28723,13,13,27955,28725,2930,2282,460,680,13509,298,5045,2061,304,2108,13509,298,363,20346,2061,28725,579,478,660,11642,272,7212,390,5045,3210,821,363,20346,28723,1794,4376,24035,304,4376,673,28725,739,272,4376,349,7887,298,272,18259,304,871,2061,659,298,1455,1059,680,13789,28725,272,21635,10110,272,7212,298,4305,2760,442,14545,2940,298,272,5273,2256,21635,302,19367,275,26795,28713,28723],"total_duration":2859657208,"load_duration":409096958,"prompt_eval_count":15,"prompt_eval_duration":70186000,"eval_count":156,"eval_duration":2380045000}% ``` This is with `0.1.31`.
Author
Owner

@eusebiu commented on GitHub (Apr 13, 2024):

Indeed, seems fixed in latest code.

<!-- gh-comment-id:2053555434 --> @eusebiu commented on GitHub (Apr 13, 2024): Indeed, seems fixed in latest code.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#27925