[PR #9830] [MERGED] llm: set done reason at server level #59764

Closed
opened 2026-04-29 14:42:18 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9830
Author: @BruceMacD
Created: 3/17/2025
Status: Merged
Merged: 4/3/2025
Merged by: @BruceMacD

Base: mainHead: brucemacd/done-reason


📝 Commits (3)

  • 21776c9 llm: set done reason at server level
  • d7839e4 remove done reason complete
  • 09fbcc5 Update llm/server.go

📊 Changes

5 files changed (+54 additions, -42 deletions)

View changed files

📝 llm/server.go (+24 -2)
📝 runner/llamarunner/runner.go (+8 -13)
📝 runner/ollamarunner/runner.go (+8 -13)
📝 server/routes.go (+10 -10)
📝 server/routes_generate_test.go (+4 -4)

📄 Description

No functional change. Many different done reasons can be set at the runner level, so rather than obsuring them we should return them to the server process and let it choose what to do with the done reason. This separates the API concerns from the runner.

As mentioned here: https://github.com/ollama/ollama/pull/9324/files#r1996413277


🔄 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/9830 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 3/17/2025 **Status:** ✅ Merged **Merged:** 4/3/2025 **Merged by:** [@BruceMacD](https://github.com/BruceMacD) **Base:** `main` ← **Head:** `brucemacd/done-reason` --- ### 📝 Commits (3) - [`21776c9`](https://github.com/ollama/ollama/commit/21776c9dfeda04df39fabce1b05eece126e16829) llm: set done reason at server level - [`d7839e4`](https://github.com/ollama/ollama/commit/d7839e4e74ff4bc675062799514e89251f2f0b8b) remove done reason complete - [`09fbcc5`](https://github.com/ollama/ollama/commit/09fbcc5ded5c186670a24510814692cee9af855f) Update llm/server.go ### 📊 Changes **5 files changed** (+54 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `llm/server.go` (+24 -2) 📝 `runner/llamarunner/runner.go` (+8 -13) 📝 `runner/ollamarunner/runner.go` (+8 -13) 📝 `server/routes.go` (+10 -10) 📝 `server/routes_generate_test.go` (+4 -4) </details> ### 📄 Description No functional change. Many different done reasons can be set at the runner level, so rather than obsuring them we should return them to the server process and let it choose what to do with the done reason. This separates the API concerns from the runner. As mentioned here: https://github.com/ollama/ollama/pull/9324/files#r1996413277 --- <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-29 14:42:18 -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#59764