[PR #12233] [MERGED] runner: simplify parser entrypoints in runner #76037

Closed
opened 2026-05-05 08:29:57 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12233
Author: @ParthSareen
Created: 9/9/2025
Status: Merged
Merged: 9/10/2025
Merged by: @ParthSareen

Base: mainHead: parth/simplify-entrypoints-runner


📝 Commits (5)

  • 6c075c8 runner: simplify tokenRepeat entrypoint
  • 5c10412 runner/parser: abstract parser interface
  • 9e30b09 runner/parser: move token repeat limit to parser
  • 936f107 runner/parser: move token repeat to addContent
  • c14b4ab runner: do not set doneReason

📊 Changes

6 files changed (+173 additions, -77 deletions)

View changed files

📝 harmony/harmonyparser.go (+8 -10)
📝 harmony/harmonyparser_test.go (+14 -14)
📝 llm/server.go (+2 -5)
parser/token_parser.go (+126 -0)
📝 runner/ollamarunner/runner.go (+8 -46)
📝 server/routes.go (+15 -2)

📄 Description

Adds interface for parsers to plug into, harmony updated to match new interface. Probably still ugly but easy to modify and change as we add new parsers


🔄 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/12233 **Author:** [@ParthSareen](https://github.com/ParthSareen) **Created:** 9/9/2025 **Status:** ✅ Merged **Merged:** 9/10/2025 **Merged by:** [@ParthSareen](https://github.com/ParthSareen) **Base:** `main` ← **Head:** `parth/simplify-entrypoints-runner` --- ### 📝 Commits (5) - [`6c075c8`](https://github.com/ollama/ollama/commit/6c075c82bb6f73265d2eedfeb3561aabd4ae631e) runner: simplify tokenRepeat entrypoint - [`5c10412`](https://github.com/ollama/ollama/commit/5c104129fb86ebfe17a49939291c85c85d5e6b39) runner/parser: abstract parser interface - [`9e30b09`](https://github.com/ollama/ollama/commit/9e30b091f122f17c2ea5056ddccd2588094cb2ee) runner/parser: move token repeat limit to parser - [`936f107`](https://github.com/ollama/ollama/commit/936f107148f50756d79059f9d8df9279cce821aa) runner/parser: move token repeat to addContent - [`c14b4ab`](https://github.com/ollama/ollama/commit/c14b4ab57f2361bf33fdd6c12143b4e29b5d037f) runner: do not set doneReason ### 📊 Changes **6 files changed** (+173 additions, -77 deletions) <details> <summary>View changed files</summary> 📝 `harmony/harmonyparser.go` (+8 -10) 📝 `harmony/harmonyparser_test.go` (+14 -14) 📝 `llm/server.go` (+2 -5) ➕ `parser/token_parser.go` (+126 -0) 📝 `runner/ollamarunner/runner.go` (+8 -46) 📝 `server/routes.go` (+15 -2) </details> ### 📄 Description Adds interface for parsers to plug into, harmony updated to match new interface. Probably still ugly but easy to modify and change as we add new parsers --- <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-05-05 08:29:57 -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#76037