Skip to content

GPT-OSS 120B has malformed tool calls and I'm not sure if it is on the Ollama side or the gpt-oss side #11704

@spullara

Description

@spullara

What is the issue?

This is a very common problem with the calls

{ "id" : "chatcmpl-655", "object" : "chat.completion", "created" : 1754434322, "model" : "gpt-oss:120b", "system_fingerprint" : "fp_ollama", "choices" : [ { "index" : 0, "message" : { "role" : "assistant", "content" : "", "reasoning" : "Now run.", "tool_calls" : [ { "id" : "call_98a1uqe2", "index" : 0, "type" : "function", "function" : { "name" : "assistant<|channel|>analysis", "arguments" : "{\"command\":\"./test\"}" } } ] }, "finish_reason" : "tool_calls" } ], "usage" : { "prompt_tokens" : 511, "completion_tokens" : 29, "total_tokens" : 540 } }

Name of the tool ought to be 'exec' rather than 'assistant<|channel|>analysis ' and it mostly calls it correctly and sometimes this happens.

Relevant log output

OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions