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

Đang mở
#750 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
json, python
Lĩnh vực
ai, backend

Hướng nghiên cứu

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}.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C++
Star
2.1k
Fork
184
Merge trung bình
12 giờ 22 phút
Pull request đã merge (30 ngày)
239

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ROCm/FastFlowLM

Tất cả issue của ROCm/FastFlowLM

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.