Skip to content

Conversation

@kubrak94
Copy link

Summary

According to Qwen-Agent’s README, the thought_in_content parameter affects tool-calling behavior.

When testing Qwen3-4B-Think, I noticed that tool calls are returned as <tool_call> tags embedded in the content rather than under api_response["choices"][0]["message"]["tools"], as expected by _parse_query_response_FC
(see reference).

Changes

  • Updated parsing logic to handle tool calls embedded in content.

  • Ensured compatibility when thought_in_content=True.

  • Prevented incorrect tool-call extraction for Qwen3-4B-Think responses.

Impact

  • Fixes leaderboard scoring for Qwen3-4B-Think.

  • Aligns parsing behavior with Qwen-Agent’s documented API.

  • Improves evaluation consistency across Qwen-Thinking models.

Testing

  • Verified with local benchmark runs using Qwen3-4B-Think.

  • Confirmed tool calls are correctly parsed and scored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant