vllm - 💡(How to fix) Fix [Bug] DeepSeek V4 tool calling returns boolean parameters as quoted strings which causes subagent failed in ClaudeCode [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#41122Fetched 2026-04-29 06:12:14
View on GitHub
Comments
0
Participants
1
Timeline
8
Reactions
0
Participants
Assignees
Timeline (top)
renamed ×4labeled ×2assigned ×1cross-referenced ×1

Code Example

{"run_in_background": "true", ...}
RAW_BUFFERClick to expand / collapse

Your current environment

Environment

  • vLLM version: latest main (commit range includes DeepSeek V4 support)
  • Model: DeepSeek V4 Flash
  • Tool parser: DeepSeekV32ToolParser (used for V4)
  • Mode: non-streaming chat completion

Steps to Reproduce

  1. Deploy DeepSeek V4 with vLLM
  2. use message endpoint for claudecode
  3. triger subagent toolcall

🐛 Describe the bug

Bug Summary

When deploying DeepSeek V4 with vLLM and using non-streaming tool calling, boolean parameters are returned as JSON strings (e.g., "true") instead of JSON booleans (true). This causes downstream agents/frameworks to fail input validation when the tool schema declares the parameter type as boolean.

It happens when we use messages endpoint for ClaudeCode calling subagent

<img width="854" height="599" alt="Image" src="https://github.com/user-attachments/assets/c46c06ff-b8bb-4c9c-bf23-b25b860fbe85" />

Actual Behavior

The arguments JSON string contains:

{"run_in_background": "true", ...}

The boolean value is wrapped in quotes, making it a JSON string.

<img width="1177" height="954" alt="Image" src="https://github.com/user-attachments/assets/7c258615-a61c-448e-bee3-d9418620612e" /> <img width="1247" height="976" alt="Image" src="https://github.com/user-attachments/assets/e7f9973b-2e84-450f-8f62-c504181e474f" />

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

TL;DR

The issue can be fixed by modifying the DeepSeekV32ToolParser to correctly parse boolean parameters from JSON strings to JSON booleans.

Guidance

  • Verify that the DeepSeekV32ToolParser is correctly configured to handle boolean parameters in non-streaming mode.
  • Check the tool schema declaration for the run_in_background parameter to ensure it is set to boolean.
  • Consider adding a custom parsing logic to the DeepSeekV32ToolParser to convert JSON string booleans to JSON booleans.
  • Test the fix by deploying DeepSeek V4 with vLLM and using the messages endpoint for ClaudeCode calling subagent.

Example

// Expected output
{"run_in_background": true,...}

// Current output
{"run_in_background": "true",...}

A potential fix could involve modifying the DeepSeekV32ToolParser to use a custom JSON deserializer that converts string booleans to boolean values.

Notes

The issue seems to be specific to the DeepSeekV32ToolParser and non-streaming mode. The fix may not apply to other parsers or modes.

Recommendation

Apply a workaround by modifying the DeepSeekV32ToolParser to correctly parse boolean parameters, as upgrading to a fixed version is not mentioned in the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING