[PR #12339] [MERGED] harmony: remove special casing in routes.go #13792

Closed
opened 2026-04-13 00:36:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12339
Author: @drifkin
Created: 9/18/2025
Status: Merged
Merged: 9/22/2025
Merged by: @drifkin

Base: mainHead: drifkin/harmony-refactor-to-builtin


📝 Commits (1)

  • e7f56ef harmony: remove special casing in routes.go

📊 Changes

5 files changed (+144 additions, -96 deletions)

View changed files

📝 .gitignore (+1 -0)
📝 harmony/harmonyparser.go (+77 -0)
📝 model/parsers/parsers.go (+14 -2)
📝 model/parsers/qwen3coder.go (+10 -4)
📝 server/routes.go (+42 -90)

📄 Description

Now that we have a built-in parser abstraction, which was introduced in https://github.com/ollama/ollama/pull/12248, we can modify our harmony parser to match this and then get rid of nearly all of the harmony-specific logic in routes.go. We do have a small amount of code that turns the parser on by default if the architecture matches and no other built-in parser was provided.

The built-in parser interface was modified in order to handle harmony's prefill and tool name translation requirements.


🔄 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/12339 **Author:** [@drifkin](https://github.com/drifkin) **Created:** 9/18/2025 **Status:** ✅ Merged **Merged:** 9/22/2025 **Merged by:** [@drifkin](https://github.com/drifkin) **Base:** `main` ← **Head:** `drifkin/harmony-refactor-to-builtin` --- ### 📝 Commits (1) - [`e7f56ef`](https://github.com/ollama/ollama/commit/e7f56ef3d8ac70280b05ec66989dfe0845f8f114) harmony: remove special casing in routes.go ### 📊 Changes **5 files changed** (+144 additions, -96 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -0) 📝 `harmony/harmonyparser.go` (+77 -0) 📝 `model/parsers/parsers.go` (+14 -2) 📝 `model/parsers/qwen3coder.go` (+10 -4) 📝 `server/routes.go` (+42 -90) </details> ### 📄 Description Now that we have a built-in parser abstraction, which was introduced in <https://github.com/ollama/ollama/pull/12248>, we can modify our harmony parser to match this and then get rid of nearly all of the harmony-specific logic in routes.go. We do have a small amount of code that turns the parser on by default if the architecture matches and no other built-in parser was provided. The built-in parser interface was modified in order to handle harmony's prefill and tool name translation requirements. --- <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:36:39 -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#13792