[PR #10490] [MERGED] strip out thinking tags in message history for qwen3 & r1 #75550

Closed
opened 2026-05-05 07:58:09 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/10490
Author: @drifkin
Created: 4/30/2025
Status: Merged
Merged: 4/30/2025
Merged by: @drifkin

Base: mainHead: drifkin/reasoning-tags


📝 Commits (2)

  • 1212afe strip out thinking tags in message history for qwen3 & r1
  • bc174a9 parse model names instead of hacky prefix check

📊 Changes

2 files changed (+148 additions, -0 deletions)

View changed files

📝 server/routes.go (+22 -0)
📝 server/routes_test.go (+126 -0)

📄 Description

This is in advance of "proper" support where we'll make reasoning configurable and we'll parse out thinking/reasoning tags and provide them to the caller. These models expect there to be no thinking tags in the message history, so this should improve quality


🔄 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/10490 **Author:** [@drifkin](https://github.com/drifkin) **Created:** 4/30/2025 **Status:** ✅ Merged **Merged:** 4/30/2025 **Merged by:** [@drifkin](https://github.com/drifkin) **Base:** `main` ← **Head:** `drifkin/reasoning-tags` --- ### 📝 Commits (2) - [`1212afe`](https://github.com/ollama/ollama/commit/1212afeb9ec8247b997163d80e01ff0a285eaa1e) strip out thinking tags in message history for qwen3 & r1 - [`bc174a9`](https://github.com/ollama/ollama/commit/bc174a902b30ab6a4aeef0b7a8ae2ddf14328d28) parse model names instead of hacky prefix check ### 📊 Changes **2 files changed** (+148 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/routes.go` (+22 -0) 📝 `server/routes_test.go` (+126 -0) </details> ### 📄 Description This is in advance of "proper" support where we'll make reasoning configurable and we'll parse out thinking/reasoning tags and provide them to the caller. These models expect there to be no thinking tags in the message history, so this should improve quality --- <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 07:58:09 -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#75550