ollama - 💡(How to fix) Fix Tool calling fails or is inconsistent with qwen models [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
ollama/ollama#15891Fetched 2026-05-01 05:33:31
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
closed ×1labeled ×1
RAW_BUFFERClick to expand / collapse

What is the issue?

I am experiencing issues where tool calling (function calling) fails to trigger or returns malformed responses when using Qwen (2.5, 3, 3.5, 3.6 tested) models, while the same implementation works perfectly with other models like gemma.

Relevant log output

OS

No response

GPU

No response

CPU

No response

Ollama version

No response

extent analysis

TL;DR

The issue may be related to compatibility problems between Qwen models and the current implementation, suggesting a need to review or adjust the integration with Qwen models.

Guidance

  • Review the documentation and release notes of Qwen models (versions 2.5, 3, 3.5, 3.6) for any changes or specific requirements that might affect the function calling process.
  • Compare the implementation details between Qwen and gemma models to identify any differences that could cause the malfunction.
  • Test the function calling process with different Qwen models to see if the issue is consistent across all versions or specific to certain ones.
  • Consider reaching out to the Qwen community or support for guidance on integrating their models, as the issue seems isolated to Qwen.

Notes

The lack of log output, OS, GPU, CPU, and Ollama version information limits the ability to provide a more specific diagnosis or solution. The guidance provided is based on the information given and may need adjustment based on additional details.

Recommendation

Apply workaround: Given the compatibility issues with Qwen models and the success with gemma models, it might be necessary to implement model-specific handling or adjustments in the function calling process until a more universal solution is found.

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