[PR #15787] [MERGED] api: accept "max" as a think value #62005

Closed
opened 2026-04-29 16:57:42 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15787
Author: @ParthSareen
Created: 4/24/2026
Status: Merged
Merged: 4/24/2026
Merged by: @ParthSareen

Base: mainHead: parth-add-max-to-valid-think


📝 Commits (3)

  • b868ccc api: accept "max" as a think value
  • 9ec4efe server: map think "max" to "high" for harmony models
  • 2389edd openai: accept "max" as a reasoning_effort value

📊 Changes

6 files changed (+87 additions, -15 deletions)

View changed files

📝 api/types.go (+7 -7)
📝 api/types_test.go (+5 -0)
📝 cmd/cmd.go (+2 -2)
📝 openai/openai.go (+2 -2)
📝 openai/openai_test.go (+51 -0)
📝 server/routes.go (+20 -4)

📄 Description

Some models will only accept max as a thinking value. Quick PR to support it.


🔄 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/15787 **Author:** [@ParthSareen](https://github.com/ParthSareen) **Created:** 4/24/2026 **Status:** ✅ Merged **Merged:** 4/24/2026 **Merged by:** [@ParthSareen](https://github.com/ParthSareen) **Base:** `main` ← **Head:** `parth-add-max-to-valid-think` --- ### 📝 Commits (3) - [`b868ccc`](https://github.com/ollama/ollama/commit/b868ccca5f9e7006fc5f52dead07d02951c58634) api: accept "max" as a think value - [`9ec4efe`](https://github.com/ollama/ollama/commit/9ec4efedbcc3a0f6aeb50e99acc046a3a8117e7d) server: map think "max" to "high" for harmony models - [`2389edd`](https://github.com/ollama/ollama/commit/2389eddc504acdbc4be2e95a607eb20018991c3d) openai: accept "max" as a reasoning_effort value ### 📊 Changes **6 files changed** (+87 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+7 -7) 📝 `api/types_test.go` (+5 -0) 📝 `cmd/cmd.go` (+2 -2) 📝 `openai/openai.go` (+2 -2) 📝 `openai/openai_test.go` (+51 -0) 📝 `server/routes.go` (+20 -4) </details> ### 📄 Description Some models will only accept `max` as a thinking value. Quick PR to support it. --- <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-29 16:57:42 -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#62005