[PR #11101] [MERGED] tools: fix parsing tool calls without any parameters #75732

Closed
opened 2026-05-05 08:09:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11101
Author: @jmorganca
Created: 6/17/2025
Status: Merged
Merged: 6/17/2025
Merged by: @jmorganca

Base: mainHead: jmorganca/fix-tool-calling-no-args


📝 Commits (9)

  • 4789d68 tools: fix parsing tools without any parameters
  • 2133ccb add test for missing args
  • 98b4952 fix parsing multiple tool calls
  • ddc953e tweak test
  • d6c3203 stricter checking on object keys when parsing arguments
  • 568d5e5 update qwen test with no args
  • 2108307 add no prop test case for json
  • 26547b9 add false positive test
  • e6a0251 fix findArguments test cases

📊 Changes

2 files changed (+297 additions, -46 deletions)

View changed files

📝 tools/tools.go (+46 -39)
📝 tools/tools_test.go (+251 -7)

📄 Description

Fixes https://github.com/ollama/ollama/issues/11099


🔄 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/11101 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 6/17/2025 **Status:** ✅ Merged **Merged:** 6/17/2025 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/fix-tool-calling-no-args` --- ### 📝 Commits (9) - [`4789d68`](https://github.com/ollama/ollama/commit/4789d68c6634331b356d6c2e4631dad10376a66e) tools: fix parsing tools without any parameters - [`2133ccb`](https://github.com/ollama/ollama/commit/2133ccb9b05c91197f346d9a67881323ffa0be63) add test for missing args - [`98b4952`](https://github.com/ollama/ollama/commit/98b4952d5b7d1bf6927676ae4bcaa065ed1ad54d) fix parsing multiple tool calls - [`ddc953e`](https://github.com/ollama/ollama/commit/ddc953e9a8cf16ab61251953df34703999aca870) tweak test - [`d6c3203`](https://github.com/ollama/ollama/commit/d6c3203554f4b1dce4f7c4ecee11a674686b4150) stricter checking on object keys when parsing arguments - [`568d5e5`](https://github.com/ollama/ollama/commit/568d5e56f047f1fd4aefe7e469b36e2f1c908a46) update qwen test with no args - [`2108307`](https://github.com/ollama/ollama/commit/210830762327180d44dad18e20dbb4e332aa71f4) add no prop test case for json - [`26547b9`](https://github.com/ollama/ollama/commit/26547b9d4a3716b31fb1b7187b38b59adc6212a2) add false positive test - [`e6a0251`](https://github.com/ollama/ollama/commit/e6a02511da6e02379d785db0e387dc929915eef9) fix findArguments test cases ### 📊 Changes **2 files changed** (+297 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `tools/tools.go` (+46 -39) 📝 `tools/tools_test.go` (+251 -7) </details> ### 📄 Description Fixes https://github.com/ollama/ollama/issues/11099 --- <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 08:09:10 -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#75732