[PR #6767] [MERGED] runner: Flush pending responses before returning #12222

Closed
opened 2026-04-12 23:52:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/6767
Author: @jessegross
Created: 9/11/2024
Status: Merged
Merged: 9/12/2024
Merged by: @jessegross

Base: mainHead: jessegross/bug_6707


📝 Commits (1)

  • 93ac376 runner: Flush pending responses before returning

📊 Changes

1 file changed (+33 additions, -27 deletions)

View changed files

📝 llm/ext_server/server.cpp (+33 -27)

📄 Description

If there are any pending reponses (such as from potential stop tokens) then we should send them back before ending the sequence. Otherwise, we can be missing tokens at the end of a response.

Fixes #6707


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/6767 **Author:** [@jessegross](https://github.com/jessegross) **Created:** 9/11/2024 **Status:** ✅ Merged **Merged:** 9/12/2024 **Merged by:** [@jessegross](https://github.com/jessegross) **Base:** `main` ← **Head:** `jessegross/bug_6707` --- ### 📝 Commits (1) - [`93ac376`](https://github.com/ollama/ollama/commit/93ac3760cb4abdd0f54ad755ed15ec4254026282) runner: Flush pending responses before returning ### 📊 Changes **1 file changed** (+33 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `llm/ext_server/server.cpp` (+33 -27) </details> ### 📄 Description If there are any pending reponses (such as from potential stop tokens) then we should send them back before ending the sequence. Otherwise, we can be missing tokens at the end of a response. Fixes #6707 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 23:52:21 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#12222