[GH-ISSUE #8499] Ollama is working fine with CLI / powershell but goes in loop on API request. #5477

Closed
opened 2026-04-12 16:42:25 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @guytechw on GitHub (Jan 20, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8499

What is the issue?

Ollama is able to run model when a message is sent through CLI /Powershell, when Cline or Roocline is used or a prompt is sent through API. Ollama is stuck in loop of previous response.

OS

Windows

GPU

Nvidia

CPU

Intel

Ollama version

0.5.7

Originally created by @guytechw on GitHub (Jan 20, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8499 ### What is the issue? Ollama is able to run model when a message is sent through CLI /Powershell, when Cline or Roocline is used or a prompt is sent through API. Ollama is stuck in loop of previous response. ### OS Windows ### GPU Nvidia ### CPU Intel ### Ollama version 0.5.7
GiteaMirror added the bug label 2026-04-12 16:42:25 -05:00
Author
Owner

@rick-github commented on GitHub (Jan 20, 2025):

Can you give an example of an API call and the output? Did you set the value of stream?

<!-- gh-comment-id:2601959147 --> @rick-github commented on GitHub (Jan 20, 2025): Can you give an example of an API call and the output? Did you set the value of `stream`?
Author
Owner

@guytechw commented on GitHub (Jan 20, 2025):

Image

Primarily i am using cline. Using ollama from settings in cline extension on VS code

Image

Image

Images for your reference response is static in cline VScode extension but when I am sending any message through CLI everything is just working fine.

<!-- gh-comment-id:2602283518 --> @guytechw commented on GitHub (Jan 20, 2025): ![Image](https://github.com/user-attachments/assets/8995e38b-f192-4ada-8a36-4f03fa97bb79) Primarily i am using cline. Using ollama from settings in cline extension on VS code ![Image](https://github.com/user-attachments/assets/5ba57444-e128-4ed9-886c-4d52275482fa) ![Image](https://github.com/user-attachments/assets/64d17bed-47e5-4331-b5a7-f39ab2f73bd8) Images for your reference response is static in cline VScode extension but when I am sending any message through CLI everything is just working fine.
Author
Owner

@rick-github commented on GitHub (Jan 20, 2025):

The first image is because no payload has been sent with the generate request. Second image contains no useful information. I'm guessing that when you say cline you are referring to https://github.com/cline/cline. You may get more informative reply if you ask there.

<!-- gh-comment-id:2602301985 --> @rick-github commented on GitHub (Jan 20, 2025): The first image is because no payload has been sent with the generate request. Second image contains no useful information. I'm guessing that when you say cline you are referring to https://github.com/cline/cline. You may get more informative reply if you ask there.
Author
Owner

@Rakhsan commented on GitHub (Jan 20, 2025):

I don't think that's even a issue

<!-- gh-comment-id:2602487685 --> @Rakhsan commented on GitHub (Jan 20, 2025): I don't think that's even a issue
Author
Owner

@rick-github commented on GitHub (Jan 21, 2025):

Could be that the API request exceeds the context window. Server logs might show more.

<!-- gh-comment-id:2605444122 --> @rick-github commented on GitHub (Jan 21, 2025): Could be that the API request exceeds the context window. [Server logs](https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#how-to-troubleshoot-issues) might show more.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#5477