openclaw - 💡(How to fix) Fix [Bug]: Tool calls not properly returned in tool_calls field when using local vLLM + Qwen models with tool_choice: "auto" [2 comments, 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
openclaw/openclaw#62874Fetched 2026-04-09 08:01:24
View on GitHub
Comments
2
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
commented ×2labeled ×2

When using local vLLM with Qwen models, tool calls are not placed in the tool_calls array when tool_choice defaults to "auto", causing OpenClaw Skills to fail to execute.

Root Cause

When using local vLLM with Qwen models, tool calls are not placed in the tool_calls array when tool_choice defaults to "auto", causing OpenClaw Skills to fail to execute.

Fix Action

Fix / Workaround

n this scenario, what is the recommended way to handle it right now? Are there any temporary workarounds (e.g. proxy, config hack, or middleware) to force tool_choice: "required" without waiting for an official fix?

Code Example

See the two curl tests below (same request, different tool_choice):

curl ... "tool_choice": "auto"   → tool_calls is empty

curl ... "tool_choice": "required"   → tool_calls correctly contains get_weather
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

When using local vLLM with Qwen models, tool calls are not placed in the tool_calls array when tool_choice defaults to "auto", causing OpenClaw Skills to fail to execute.

Steps to reproduce

Start vLLM with Qwen3-VL-32B-Instruct (or Qwen2.5-72B). Send a chat completion request from OpenClaw containing a tools definition (e.g. get_weather tool). Observe the response from vLLM.

Expected behavior

The response should contain a populated tool_calls array with the tool name and arguments, so OpenClaw can execute the skill.

Actual behavior

tool_calls array is empty. The model sometimes puts the tool call in content instead. Only when explicitly setting "tool_choice": "required" does tool_calls get populated correctly.

OpenClaw version

2026.4.2 (d74a122)

Operating system

Ubuntu

Install method

Bare metal (nohup + openclaw gateway run)

Model

Qwen3-VL-32B-Instruct(and other Qwen models)

Provider / routing chain

Local vLLM (OpenAI-compatible endpoint at http://127.0.0.1:8000/v1)

Additional provider/model setup details

vLLM 0.19.x running with --tensor-parallel-size 8 on 8× RTX 4090D.

Logs, screenshots, and evidence

See the two curl tests below (same request, different tool_choice):

curl ... "tool_choice": "auto"   → tool_calls is empty

curl ... "tool_choice": "required"   → tool_calls correctly contains get_weather

Impact and severity

Affected users/systems: All users running OpenClaw with local vLLM + Qwen models who want to use Skills/Tools. Severity: Blocks workflow (Skills cannot be executed). Frequency: Always (when tool_choice is auto). Consequence: Tools/Skills like weather, news, reminders fail to run, severely limiting practical usage.

Additional information

In my use case, I run multiple isolated OpenClaw instances for a multi-tenant SaaS service. Reliable tool calling is essential.

n this scenario, what is the recommended way to handle it right now? Are there any temporary workarounds (e.g. proxy, config hack, or middleware) to force tool_choice: "required" without waiting for an official fix?

extent analysis

TL;DR

Set "tool_choice" to "required" to populate the tool_calls array correctly, as a temporary workaround until the issue is officially fixed.

Guidance

  • Verify that setting "tool_choice" to "required" works for all tools and models, including Qwen3-VL-32B-Instruct and Qwen2.5-72B.
  • Consider implementing a temporary middleware or proxy to automatically set "tool_choice" to "required" for all incoming requests, to minimize changes to the existing workflow.
  • Test this workaround with multiple isolated OpenClaw instances to ensure it works correctly in a multi-tenant SaaS service setup.
  • Monitor the official issue tracker for updates on a permanent fix, as this workaround may have unintended consequences or be reverted in the future.

Example

No code example is provided, as the issue does not require a specific code change, but rather a configuration or middleware adjustment.

Notes

This workaround may have performance or functionality implications, as it forces the "tool_choice" to "required" for all requests. It is essential to test this workaround thoroughly to ensure it does not introduce new issues.

Recommendation

Apply the workaround by setting "tool_choice" to "required", as it is the most straightforward way to populate the tool_calls array correctly until an official fix is available.

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…

FAQ

Expected behavior

The response should contain a populated tool_calls array with the tool name and arguments, so OpenClaw can execute the skill.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING