Tool calling serializes boolean arguments as strings with Qwen3.5 ("True" instead of true)

オープン
#750 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
json, python
領域
ai, backend

調査の方向性

The issue is in the tool-call argument conversion/serialization step. Look at the code that parses the model's raw tool output (like <parameter=accepted>\nTrue\n</parameter>) and converts it to JSON. The bug likely resides where string values are not coerced to the declared JSON Schema type (boolean). Start by searching for functions handling tool argument serialization in the codebase, then write a test using the provided curl command to verify the fix produces {"accepted":true}.

索引モデルが issue の本文から書いたものです。

説明

Description

FastFlowLM v1.0.6 serializes a tool argument defined as JSON Schema
boolean as a JSON string when using qwen3.5:9b.

The tool schema explicitly defines:

"accepted": {
"type": "boolean"
}

However, FastFlowLM returns:

{"accepted":"True"}

instead of:

{"accepted":true}

This causes OpenAI-compatible clients that validate tool arguments
against the supplied JSON Schema to reject the tool call.

Environment

FastFlowLM: v1.0.6

Model: qwen3.5:9b

Linux portable build: fastflowlm_1.0.6_linux.tar.gz

API: /v1/chat/completions

Minimal reproducer

curl -s http://127.0.0.1:8000/v1/chat/completions
-H 'Content-Type: application/json'
-d '{"model":"qwen3.5:9b","stream":false,"messages":[{"role":"user","content":"Call confirm_result with accepted set to true."}],"tools":[{"type":"function","function":{"name":"confirm_result","description":"Confirm the result","parameters":{"type":"object","properties":{"accepted":{"type":"boolean"}},"required":["accepted"]}}}],"tool_choice":{"type":"function","function":{"name":"confirm_result"}}}'

Actual result

FastFlowLM returns the tool arguments as:

"arguments":"{"accepted":"True"}"

Decoded:

{
"accepted": "True"
}

The value is a JSON string.

Expected result

The tool arguments should preserve the type specified by the JSON
Schema:

"arguments":"{"accepted":true}"

Decoded:

{
"accepted": true
}

The value should be a JSON boolean.

Additional information

The model's raw tool output contains:

<parameter=accepted>
True

FastFlowLM then converts this to:

{"accepted":"True"}

So it appears that the tool-call argument conversion/serialization step
does not coerce the generated value according to the parameter type
declared in the supplied tool JSON Schema.

This is reproducible with a minimal request and does not require a large
context or a multi-turn conversation.

主要言語
C++
スター
2.1k
フォーク
184
平均マージ
12時間 22分
マージ済み PR(30日)
239

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ROCm/FastFlowLM のほかの issue

ROCm/FastFlowLM の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。