[PR #12219] [CLOSED] runner: enable structured outputs for gpt-oss #19008

Closed
opened 2026-04-16 06:54:11 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12219
Author: @ParthSareen
Created: 9/8/2025
Status: Closed

Base: mainHead: parth/enable-so-gpt-oss


📝 Commits (2)

  • 1e5fecb runner/parser: allow on-the-fly grammar constraining
  • c0aeb35 runner: add sync between computeBatch and completion

📊 Changes

4 files changed (+63 additions, -9 deletions)

View changed files

📝 harmony/harmonyparser.go (+12 -6)
📝 parser/token_parser.go (+9 -0)
📝 runner/ollamarunner/runner.go (+35 -3)
📝 sample/samplers.go (+7 -0)

📄 Description

  • Added flag in harmony to signal when structured outputs is possible
  • Runner checks for signal and adds the grammar sampler when enabled

🔄 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/12219 **Author:** [@ParthSareen](https://github.com/ParthSareen) **Created:** 9/8/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `parth/enable-so-gpt-oss` --- ### 📝 Commits (2) - [`1e5fecb`](https://github.com/ollama/ollama/commit/1e5fecbbc3b2b3ff0b1c25a861e78cacff371cc2) runner/parser: allow on-the-fly grammar constraining - [`c0aeb35`](https://github.com/ollama/ollama/commit/c0aeb3531bf3693a5b89a2ef7dc074a88bb79b74) runner: add sync between computeBatch and completion ### 📊 Changes **4 files changed** (+63 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `harmony/harmonyparser.go` (+12 -6) 📝 `parser/token_parser.go` (+9 -0) 📝 `runner/ollamarunner/runner.go` (+35 -3) 📝 `sample/samplers.go` (+7 -0) </details> ### 📄 Description - Added flag in harmony to signal when structured outputs is possible - Runner checks for signal and adds the grammar sampler when enabled --- <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-16 06:54:11 -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#19008