[PR #13041] [MERGED] app/ui: do not send thinking to prevent errors with cloud provider #14044

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13041
Author: @hoyyeva
Created: 11/11/2025
Status: Merged
Merged: 11/11/2025
Merged by: @hoyyeva

Base: mainHead: hoyyeva/non-thinking-model


📝 Commits (4)

📊 Changes

2 files changed (+13 additions, -5 deletions)

View changed files

📝 app/ui/app/src/api.ts (+8 -1)
📝 app/ui/ui.go (+5 -4)

📄 Description

When chatting with non-thinking models through cloud providers, the app was sending "think": false in every request. Cloud providers convert this to "reasoning_effort": "none", but non-thinking models reject reasoning_effort parameter (including "none"), causing 500 Internal Server Error: unmarshal: invalid character 'I' errors.

This fix only includes the think parameter when actually requesting thinking (true or "high"/"medium"/"low"), and omits it entirely when false or "none". This prevents the parameter from being sent to providers that would reject it, and adds early validation with clear error messages when users try to enable thinking on non-reasoning models.


🔄 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/13041 **Author:** [@hoyyeva](https://github.com/hoyyeva) **Created:** 11/11/2025 **Status:** ✅ Merged **Merged:** 11/11/2025 **Merged by:** [@hoyyeva](https://github.com/hoyyeva) **Base:** `main` ← **Head:** `hoyyeva/non-thinking-model` --- ### 📝 Commits (4) - [`2aaf29a`](https://github.com/ollama/ollama/commit/2aaf29acb5caf3f1fdc50cd48542c94df801752f) app/ui: do not send to prevent errors with cloud provider - [`6a818b8`](https://github.com/ollama/ollama/commit/6a818b8a094c2f53775d877f38f7f855346c77a7) clean up - [`9d615cd`](https://github.com/ollama/ollama/commit/9d615cdaa0f1eb96491b672c9e48f999338dffa5) fix test - [`2a9b61f`](https://github.com/ollama/ollama/commit/2a9b61f099b5f5307b3af463bd6b1464941260fd) address comment ### 📊 Changes **2 files changed** (+13 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `app/ui/app/src/api.ts` (+8 -1) 📝 `app/ui/ui.go` (+5 -4) </details> ### 📄 Description When chatting with non-thinking models through cloud providers, the app was sending `"think": false` in every request. Cloud providers convert this to `"reasoning_effort": "none"`, but non-thinking models reject `reasoning_effort` parameter (including "none"), causing `500 Internal Server Error: unmarshal: invalid character 'I'` errors. This fix only includes the `think` parameter when actually requesting thinking (true or "high"/"medium"/"low"), and omits it entirely when false or "none". This prevents the parameter from being sent to providers that would reject it, and adds early validation with clear error messages when users try to enable thinking on non-reasoning models. --- <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:43:16 -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#14044