[PR #13787] [CLOSED] parsers: fix nested tool call parsing by counting brace nesting levels #40264

Closed
opened 2026-04-23 01:12:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13787
Author: @Chenhao-Guan
Created: 1/20/2026
Status: Closed

Base: mainHead: fix/ministral-nested-tool-call


📝 Commits (1)

  • 521f730 parsers: fix nested tool call parsing by counting brace nesting levels

📊 Changes

1 file changed (+37 additions, -17 deletions)

View changed files

📝 model/parsers/ministral.go (+37 -17)

📄 Description

The parser now correctly handles nested objects and arrays in tool
arguments by counting brace nesting levels instead of stopping at
the first closing brace.

Fixes #13705


🔄 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/13787 **Author:** [@Chenhao-Guan](https://github.com/Chenhao-Guan) **Created:** 1/20/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/ministral-nested-tool-call` --- ### 📝 Commits (1) - [`521f730`](https://github.com/ollama/ollama/commit/521f7301b0b7a60402dd0ad25cf6d7f051363ad3) parsers: fix nested tool call parsing by counting brace nesting levels ### 📊 Changes **1 file changed** (+37 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `model/parsers/ministral.go` (+37 -17) </details> ### 📄 Description The parser now correctly handles nested objects and arrays in tool arguments by counting brace nesting levels instead of stopping at the first closing brace. Fixes #13705 --- <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-23 01:12:30 -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#40264