[PR #15678] [MERGED] server: apply format when think=false with thinking-capable parser #77552

Closed
opened 2026-05-05 10:13:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15678
Author: @ParthSareen
Created: 4/18/2026
Status: Merged
Merged: 4/21/2026
Merged by: @ParthSareen

Base: mainHead: parth/fix-format-think-false


📝 Commits (3)

  • 815f043 server: apply format when think=false with thinking-capable parser
  • aa1e197 server: scope think=false format gating to gemma4
  • 62a8798 Update comment

📊 Changes

2 files changed (+130 additions, -1 deletions)

View changed files

📝 server/routes.go (+4 -1)
📝 server/routes_generate_test.go (+126 -0)

📄 Description

Fixes #15260.

Adding a small patch to allow gemma4 to be constrained with thinking turned off. The cases for other models may vary, so a long term solution must be added on a parser level. Small PR to unblock users.


🔄 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/15678 **Author:** [@ParthSareen](https://github.com/ParthSareen) **Created:** 4/18/2026 **Status:** ✅ Merged **Merged:** 4/21/2026 **Merged by:** [@ParthSareen](https://github.com/ParthSareen) **Base:** `main` ← **Head:** `parth/fix-format-think-false` --- ### 📝 Commits (3) - [`815f043`](https://github.com/ollama/ollama/commit/815f043695e9725d7be9c5c4d7ec79633d0f55d1) server: apply format when think=false with thinking-capable parser - [`aa1e197`](https://github.com/ollama/ollama/commit/aa1e1972c87111a8e316ce05c8bf87763c48a213) server: scope think=false format gating to gemma4 - [`62a8798`](https://github.com/ollama/ollama/commit/62a8798a49388dbf4db21ba8d80221c4282174eb) Update comment ### 📊 Changes **2 files changed** (+130 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `server/routes.go` (+4 -1) 📝 `server/routes_generate_test.go` (+126 -0) </details> ### 📄 Description Fixes #15260. Adding a small patch to allow gemma4 to be constrained with thinking turned off. The cases for other models may vary, so a long term solution must be added on a parser level. Small PR to unblock users. --- <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 10:13:40 -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#77552