Skip to content

Bug: Tool calls merged during streaming (Minimax-M3) ollama #340

Description

@iavinas

Observed with ollama/minimax-m3:cloud, but not with ollama/glm-5.2:cloud

session logs.

{
  "content": "I'll build an Apple Health data analysis agent with OpenAI-compatible API support. Let me start by researching the best approach and understanding the data formats.",
  "role": "assistant",
  "tool_calls": [
    {
      "function": {
        "arguments": "{}",
        "name": "bashresearch"
      },
      "id": "call_019ef351bf187002a416a4d8",
      "type": "function"
    }
  ],
  "function_call": null,
  "provider_specific_fields": null
}
{
  "content": "ERROR: Tool call to 'bashresearch' had malformed JSON arguments and was NOT executed. Retry with smaller content \u2014 for 'write', split into multiple smaller writes using 'edit'.",
  "role": "tool",
  "tool_calls": null,
  "function_call": null,
  "provider_specific_fields": null,
  "tool_call_id": "call_019ef351bf187002a416a4d8",
  "name": "bashresearch"
}

It appears that multiple tool calls are being merged during streaming, causing invalid tool names such as bashresearch. This was reproduced several times with Minimax-M3 and led to repeated failed tool invocations.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions