[GH-ISSUE #11505] tool call parsing broken when arguments precede function name #7601

Closed
opened 2026-04-12 19:41:12 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @ghost on GitHub (Jul 23, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11505

Originally assigned to: @jmorganca on GitHub.

What is the issue?

Until this change in v0.9.6, tool call parsing would parse arguments that came before the function name (like: {"arguments": {"arg1": "1"}, "name": "my_function"}).

Some models like granite3.2:8b and granite3.3:8b tend to call tools in this format. This is an unexpected change since it was previously working in v0.9.2.

Relevant log output

Here's a tool call from granite3.3:8b that previously worked but is now causing the issue:

"<|tool_call|>[{\"arguments\": {\"md\": \"| Month    | Savings   |\\n|----------|------------|\\n| January  | $250       |\\n| February | $80        |\\n| March    | $420       |\"}, \"name\": \"from_markdown\"}]"

OS

macOS

GPU

No response

CPU

Intel

Ollama version

tested with v0.9.6 and v0.9.2

Originally created by @ghost on GitHub (Jul 23, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11505 Originally assigned to: @jmorganca on GitHub. ### What is the issue? Until [this change](https://github.com/ollama/ollama/pull/11233) in `v0.9.6`, tool call parsing would parse arguments that came before the function name (like: `{"arguments": {"arg1": "1"}, "name": "my_function"}`). Some models like granite3.2:8b and granite3.3:8b tend to call tools in this format. This is an unexpected change since it was previously working in `v0.9.2`. ### Relevant log output ```shell Here's a tool call from granite3.3:8b that previously worked but is now causing the issue: "<|tool_call|>[{\"arguments\": {\"md\": \"| Month | Savings |\\n|----------|------------|\\n| January | $250 |\\n| February | $80 |\\n| March | $420 |\"}, \"name\": \"from_markdown\"}]" ``` ### OS macOS ### GPU _No response_ ### CPU Intel ### Ollama version tested with v0.9.6 and v0.9.2
GiteaMirror added the bug label 2026-04-12 19:41:12 -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#7601