#14653·kilocode

GLM model served by Mistral Provider fail to use tool

Author: scauglogCreated Sep 29, 2026Updated Sep 29, 2026
Labelsbug

Description

when using GLM model via the mistral provider if the LLM try to invoke tools we see a json validation error

{
  "name": "UnknownError",
  "data": {
    "message": "Type validation failed: Value: {\"id\":\"2e53518d9b504a61882ae34e199855f5\",\"object\":\"chat.completion.chunk\",\"created\":1790668893,\"model\":\"zai-glm-5-2\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"type\":\"function\",\"function\":{\"name\":\"\",\"arguments\":\"/user/directory\"},\"index\":0}],\"index\":0,\"content\":\"\"},\"finish_reason\":null,\"logprobs\":null}]}.\nError message: [\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"choices\",\n      0,\n      \"delta\",\n      \"tool_calls\",\n      0,\n      \"id\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  }\n]"
  }
}

Plugins

vscode kilo extension

Kilo version

7.8.1

Steps to reproduce

  1. use GLM-5.2 on the mistral provider
  2. write the following prompt "how many packages are used in this repository"
  3. the chat window display the following error Invalid input for tool read

Screenshot and/or share link

No response

Operating System

Ubuntu 22.04

Terminal

Zsh