[PR #15136] feat: add no‑op think tool for structured reasoning #20317

Open
opened 2026-04-16 07:33:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15136
Author: @harshitgavita-07
Created: 3/29/2026
Status: 🔄 Open

Base: mainHead: feature/think-tool


📝 Commits (3)

  • 627085a docs: add experimental WebGPU backend stub documentation
  • 505e636 feat: add no‑op think tool for structured reasoning
  • 8674c6a Merge branch 'feature/webgpu-stub' into feature/think-tool

📊 Changes

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

View changed files

docs/webgpu-stub.md (+24 -0)
x/tools/think.go (+45 -0)

📄 Description

This PR adds a minimal think tool to the x/tools package. It provides a simple no‑op reasoning step that models can call before performing external actions.

Why: Encourages a plan‑first pattern (think → choose tool → act) and reduces malformed tool calls.

What

  • x/tools/think.go – implementation with JSON input { "thought": "…" }.
  • Returns { "status": "ok" } after validation.
  • Stub Register function ready for integration.

Next steps: Wire the tool into the global registry, add tests, and expose it in the UI.

@jmorganca, happy to iterate on this if it aligns with the roadmap.

Closes #15134


🔄 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/15136 **Author:** [@harshitgavita-07](https://github.com/harshitgavita-07) **Created:** 3/29/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feature/think-tool` --- ### 📝 Commits (3) - [`627085a`](https://github.com/ollama/ollama/commit/627085ab0cf88266e7cb4c9f5904c4c74d721006) docs: add experimental WebGPU backend stub documentation - [`505e636`](https://github.com/ollama/ollama/commit/505e63606624b26526d6a67d2a685be4963e0031) feat: add no‑op think tool for structured reasoning - [`8674c6a`](https://github.com/ollama/ollama/commit/8674c6a770fa3e7e2eefd1b0eff22a218cb484db) Merge branch 'feature/webgpu-stub' into feature/think-tool ### 📊 Changes **2 files changed** (+69 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `docs/webgpu-stub.md` (+24 -0) ➕ `x/tools/think.go` (+45 -0) </details> ### 📄 Description This PR adds a minimal `think` tool to the `x/tools` package. It provides a simple no‑op reasoning step that models can call before performing external actions. **Why**: Encourages a plan‑first pattern (think → choose tool → act) and reduces malformed tool calls. **What** - `x/tools/think.go` – implementation with JSON input `{ "thought": "…" }`. - Returns `{ "status": "ok" }` after validation. - Stub `Register` function ready for integration. **Next steps**: Wire the tool into the global registry, add tests, and expose it in the UI. @jmorganca, happy to iterate on this if it aligns with the roadmap. Closes #15134 --- <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-16 07:33:05 -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#20317