[PR #12052] [MERGED] runner: move harmony to runner #13697

Closed
opened 2026-04-13 00:33:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12052
Author: @ParthSareen
Created: 8/23/2025
Status: Merged
Merged: 9/8/2025
Merged by: @ParthSareen

Base: mainHead: parth/move-harmony-to-runner


📝 Commits (10+)

  • 6230bab harmony: move harmony parsing into a package
  • b08c75f server: add thinking and tool calls to CompletionResponse
  • 7188f2a server: update completion request signature and update token repeat
  • 2119830 harmony: simplify prefill, add marshalling for functions, and update harmony check
  • 4a9d724 routes: ChatHandler to get parsed harmony from runner
  • 854a8fc harmony: add harmony parsing to runner
  • 8d66ef7 harmony: move tests from routes to parser
  • 77a2b76 cleanup passing in harmony flag and add generate support
  • 48491a9 harmony: remove FunctionNameMap marshalling
  • 60a7ed5 prefill: simplify prefilling content or thinking

📊 Changes

6 files changed (+369 additions, -337 deletions)

View changed files

📝 harmony/harmonyparser.go (+35 -11)
📝 harmony/harmonyparser_test.go (+200 -0)
📝 llm/server.go (+22 -15)
📝 runner/ollamarunner/runner.go (+54 -1)
📝 server/routes.go (+42 -89)
📝 server/routes_harmony_streaming_test.go (+16 -221)

📄 Description

  • moved harmony parsing to the runner
  • changed completion request to take in params to set up harmony
  • runner can now send back content, thinking, and tool calls

🔄 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/12052 **Author:** [@ParthSareen](https://github.com/ParthSareen) **Created:** 8/23/2025 **Status:** ✅ Merged **Merged:** 9/8/2025 **Merged by:** [@ParthSareen](https://github.com/ParthSareen) **Base:** `main` ← **Head:** `parth/move-harmony-to-runner` --- ### 📝 Commits (10+) - [`6230bab`](https://github.com/ollama/ollama/commit/6230babd6424acee3580e3c25dd0ceb00f2d8236) harmony: move harmony parsing into a package - [`b08c75f`](https://github.com/ollama/ollama/commit/b08c75ff063d96897ad10a9961f4c95a56034cf7) server: add thinking and tool calls to CompletionResponse - [`7188f2a`](https://github.com/ollama/ollama/commit/7188f2a7f57695898078136de830215e897828c3) server: update completion request signature and update token repeat - [`2119830`](https://github.com/ollama/ollama/commit/2119830757346e9f16042915119d7c8a754d69bf) harmony: simplify prefill, add marshalling for functions, and update harmony check - [`4a9d724`](https://github.com/ollama/ollama/commit/4a9d724fdde198052b69dfa5bf89d5ab67bfb114) routes: ChatHandler to get parsed harmony from runner - [`854a8fc`](https://github.com/ollama/ollama/commit/854a8fc59d6adce48b7d6680ed9481030691b022) harmony: add harmony parsing to runner - [`8d66ef7`](https://github.com/ollama/ollama/commit/8d66ef753455f302e8f3b3537dc9b546d41b992e) harmony: move tests from routes to parser - [`77a2b76`](https://github.com/ollama/ollama/commit/77a2b76073a44f8e7cd604b840a6ca4520b74fbf) cleanup passing in harmony flag and add generate support - [`48491a9`](https://github.com/ollama/ollama/commit/48491a98455ebd8028964b26eb28040567ce27b1) harmony: remove FunctionNameMap marshalling - [`60a7ed5`](https://github.com/ollama/ollama/commit/60a7ed54054b90e280657d846b24a6f11bf23b56) prefill: simplify prefilling content or thinking ### 📊 Changes **6 files changed** (+369 additions, -337 deletions) <details> <summary>View changed files</summary> 📝 `harmony/harmonyparser.go` (+35 -11) 📝 `harmony/harmonyparser_test.go` (+200 -0) 📝 `llm/server.go` (+22 -15) 📝 `runner/ollamarunner/runner.go` (+54 -1) 📝 `server/routes.go` (+42 -89) 📝 `server/routes_harmony_streaming_test.go` (+16 -221) </details> ### 📄 Description - moved harmony parsing to the runner - changed completion request to take in params to set up harmony - runner can now send back content, thinking, and tool calls --- <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-13 00:33:06 -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#13697