[PR #12460] [MERGED] routes: structured outputs for thinking models /chat endpoint #13828

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

📋 Pull Request Information

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

Base: mainHead: parth/double-req-structured-outputs


📝 Commits (1)

  • b0bf1ac routes: structured outputs for gpt-oss

📊 Changes

2 files changed (+374 additions, -61 deletions)

View changed files

📝 server/routes.go (+140 -61)
📝 server/routes_generate_test.go (+234 -0)

📄 Description

To enable structured outputs for gpt-oss and other thinking models we need to be able change completion parameters on the fly.

This PR:

  • Allows us to cancel an ongoing request
  • Update request params and make another request while appearing as single request
  • manually adds header for gpt-oss
  • does not update generate handler for now

🔄 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/12460 **Author:** [@ParthSareen](https://github.com/ParthSareen) **Created:** 9/30/2025 **Status:** ✅ Merged **Merged:** 10/9/2025 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `parth/double-req-structured-outputs` --- ### 📝 Commits (1) - [`b0bf1ac`](https://github.com/ollama/ollama/commit/b0bf1ac2a4df78530125bfb341aad80a93f14c96) routes: structured outputs for gpt-oss ### 📊 Changes **2 files changed** (+374 additions, -61 deletions) <details> <summary>View changed files</summary> 📝 `server/routes.go` (+140 -61) 📝 `server/routes_generate_test.go` (+234 -0) </details> ### 📄 Description To enable structured outputs for gpt-oss and other thinking models we need to be able change completion parameters on the fly. This PR: - Allows us to cancel an ongoing request - Update request params and make another request while appearing as single request - manually adds header for gpt-oss - does not update generate handler for now --- <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:38:00 -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#13828