Skip to content

Eval bug: params_schema.type can be JSON array, but autoparser assumes it as string #8

@cr0sh

Description

@cr0sh

Name and Version

version: 7990 (5abd9666d)
built with AppleClang 17.0.0.17000404 for Darwin arm64

Operating systems

Mac

GGML backends

Metal

Hardware

Apple M4 Max, 40 GPU cores, 64G Unified Memory

Models

Huggingface unsloth/Qwen3-Coder-Next:MXFP4_MOE

Problem description & steps to reproduce

With some MCP tools enabled (namely Chrome Devtools MCP) and using Opencode, llama-server instantly crashes with initial prompt.

Automatic parser generation failed: [json.exception.type_error.302] type must be string, but is array
llama.cpp/common/chat.cpp:1260: Unable to generate parser for this template.

I dug into LLDB backtraces and found out that the crashing point is

auto type = param_schema.value("type", "object");
. Looking at the inspected value, Chrome Devtools MCP allows the fieldtype be "nullable" and expresses it as ["<type>", null] where the autoparser expects to be string. Unhandled type error occurs.

I didn't followed up how the autoparser's strategy will be when nullability is allowed, so I didn't try to implement a fix on my own. Maybe just recognize if it's nullable then silently ignore it?

First Bad Commit

No response

Relevant log output

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions