[PR #15255] [CLOSED] model/parsers/gemma4: fix tool call argument parsing with internal quotes #46342

Closed
opened 2026-04-25 01:48:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15255
Author: @chathaway-codes
Created: 4/3/2026
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • d928879 model/parsers/gemma4: fix tool call argument parsing with internal quotes

📊 Changes

2 files changed (+42 additions, -36 deletions)

View changed files

📝 model/parsers/gemma4.go (+27 -36)
📝 model/parsers/gemma4_test.go (+15 -0)

📄 Description

The Gemma 4 parser now correctly handles tool call arguments that contain internal quotes by properly escaping content within <|"|> quotes. This fixes a parsing error when tool calls included shell commands or other quoted strings.

Fixes #15241


🔄 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/15255 **Author:** [@chathaway-codes](https://github.com/chathaway-codes) **Created:** 4/3/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`d928879`](https://github.com/ollama/ollama/commit/d928879a09f72d9180bf782011bfe693eb3c022a) model/parsers/gemma4: fix tool call argument parsing with internal quotes ### 📊 Changes **2 files changed** (+42 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `model/parsers/gemma4.go` (+27 -36) 📝 `model/parsers/gemma4_test.go` (+15 -0) </details> ### 📄 Description The Gemma 4 parser now correctly handles tool call arguments that contain internal quotes by properly escaping content within <|"|> quotes. This fixes a parsing error when tool calls included shell commands or other quoted strings. Fixes #15241 --- <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-25 01:48: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#46342