[PR #15629] cmd/run: add thinkingstderr argument flag #25730

Open
opened 2026-04-19 18:25:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15629
Author: @pedrohml
Created: 4/16/2026
Status: 🔄 Open

Base: mainHead: add-thinkingstderr-flag


📝 Commits (1)

  • a4654f9 cmd/run: add thinkingstderr argument flag

📊 Changes

3 files changed (+107 additions, -49 deletions)

View changed files

📝 cmd/cmd.go (+57 -24)
📝 cmd/cmd_test.go (+9 -0)
📝 x/cmd/run.go (+41 -25)

📄 Description

Add support to send the thinking response to standard error so it become easier to pipe the plain response in shell

Example:

> ollama run gemma4 --thinkingstderr "How to count lines from file ? Avoid preamble or conclusion. Just respond with the command" | pbcopy
Thinking...
Plan: Use `wc -l` on a list of files to count lines. Since the request asks for a single command
line, passing all files at once is efficient.
...done thinking.

> pbpaste
wc -l filename

🔄 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/15629 **Author:** [@pedrohml](https://github.com/pedrohml) **Created:** 4/16/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `add-thinkingstderr-flag` --- ### 📝 Commits (1) - [`a4654f9`](https://github.com/ollama/ollama/commit/a4654f9b2fbc8a09ab2d7dab8cdf9763eb17e18c) cmd/run: add thinkingstderr argument flag ### 📊 Changes **3 files changed** (+107 additions, -49 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+57 -24) 📝 `cmd/cmd_test.go` (+9 -0) 📝 `x/cmd/run.go` (+41 -25) </details> ### 📄 Description Add support to send the thinking response to standard error so it become easier to pipe the plain response in shell Example: ``` > ollama run gemma4 --thinkingstderr "How to count lines from file ? Avoid preamble or conclusion. Just respond with the command" | pbcopy Thinking... Plan: Use `wc -l` on a list of files to count lines. Since the request asks for a single command line, passing all files at once is efficient. ...done thinking. > pbpaste wc -l filename ``` --- <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-19 18:25:06 -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#25730