[GH-ISSUE #11781] GPTOSS (Harmony) tool call parse failure during streaming results in object with key error parsing tool call in Ollama v0.11.3 #7810

Closed
opened 2026-04-12 19:59:03 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @moll on GitHub (Aug 7, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11781

What is the issue?

Hey,

Thanks for maintaining Ollama! I noticed that if Ollama v0.11.3 fails to parse GPT OSS's tool calls during streaming, it incorrectly outputs an object with key error parsing tool call. I think this was intended to be error instead and parsing tool call perhaps part of the value.

Relevant source line: aa9d889522/server/routes.go (L367)

Maybe it ought to just pass whatever it attempted to parse as text if parsing failed, but that's probably a topic for another issue.

Cheers

Ollama version

v0.11.3

Originally created by @moll on GitHub (Aug 7, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11781 ### What is the issue? Hey, Thanks for maintaining Ollama! I noticed that if Ollama v0.11.3 fails to parse GPT OSS's tool calls during streaming, it incorrectly outputs an object with key `error parsing tool call`. I think this was intended to be `error` instead and `parsing tool call` perhaps part of the value. Relevant source line: https://github.com/ollama/ollama/blob/aa9d889522b016f16d8a87994c2b577e3e9ade7c/server/routes.go#L367 Maybe it ought to just pass whatever it attempted to parse as text if parsing failed, but that's probably a topic for another issue. Cheers ### Ollama version v0.11.3
GiteaMirror added the bug label 2026-04-12 19:59:03 -05:00
Author
Owner

@Codeblockz commented on GitHub (Aug 7, 2025):

I think this is the same issue being investigated here https://github.com/ollama/ollama/issues/11704

<!-- gh-comment-id:3164342875 --> @Codeblockz commented on GitHub (Aug 7, 2025): I think this is the same issue being investigated here https://github.com/ollama/ollama/issues/11704
Author
Owner

@moll commented on GitHub (Aug 7, 2025):

I think this is the same issue being investigated here #11704

To me that issue is investigating why tool parsing fails, not the invalid error it produces when it fails. I'm just highlighting the error is probably constructed wrong.

<!-- gh-comment-id:3164366570 --> @moll commented on GitHub (Aug 7, 2025): > I think this is the same issue being investigated here [#11704](https://github.com/ollama/ollama/issues/11704) To me that issue is investigating why tool parsing fails, not the invalid error it produces when it fails. I'm just highlighting the error is probably constructed wrong.
Author
Owner

@MarkWard0110 commented on GitHub (Aug 8, 2025):

https://github.com/ollama/ollama/issues/11800

<!-- gh-comment-id:3167970656 --> @MarkWard0110 commented on GitHub (Aug 8, 2025): https://github.com/ollama/ollama/issues/11800
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#7810